Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32L152: Added ADC Bank_B functionality #14669

Merged
merged 2 commits into from
Jun 2, 2021

Conversation

affrinpinhero-2356
Copy link
Contributor

@affrinpinhero-2356 affrinpinhero-2356 commented May 17, 2021

Summary of changes

Modified analogin_init function to take correct value for ChannelsBank depends on ADC pin.
This commit adds ADC Bank_B usablity to STm32L152RE. With this commit PB_2 can also woak as ADC_IN.

Impact of changes

Migration actions required

Documentation


Pull request type:

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)


Test results:

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

@affrinpinhero-2356 affrinpinhero-2356 changed the title STM32: driver/ADC: Added ADC ChannelsBank feature to STM32L152RE. STM32: driver/ADC: Modified analogin_init function to take correct value for ChannelsBank depends on ADC pin. May 17, 2021
@ciarmcom ciarmcom requested review from a team May 17, 2021 14:00
@ciarmcom
Copy link
Member

@affrinpinhero-2356, thank you for your changes.
@ARMmbed/team-st-mcd @ARMmbed/mbed-os-maintainers please review.

@@ -82,6 +82,10 @@ extern "C" {
#define STM_PIN_AN_CTRL_SHIFT 20
#define STM_PIN_ANALOG_CONTROL_BIT (STM_PIN_AN_CTRL_MASK << STM_PIN_AN_CTRL_SHIFT)

#define STM_PIN_AN_CHAN_BANK_B_MASK 0x01
#define STM_PIN_AN_CHAN_BANK_B_SHIFT 22
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the beginning of this file (line 50)

PS: why bit 22 is used and not 21 ? :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected and Updated line 50.

* [18] Inverted (Analog/Timer specific)
* [19] Analog ADC control - Only valid for specific families
* [32:21] Reserved
* [19] Inverted (Analog/Timer specific)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch ....

0xc0170
0xc0170 previously approved these changes May 18, 2021
@mergify mergify bot added needs: CI and removed needs: review labels May 18, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented May 18, 2021

CI started

@mbed-ci
Copy link

mbed-ci commented May 18, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@adbridge
Copy link
Contributor

@affrinpinhero-2356 you have modified the PR template and changed it's format, could you please correct it.

@affrinpinhero-2356
Copy link
Contributor Author

@affrinpinhero-2356 you have modified the PR template and changed it's format, could you please correct it.

Corrected.

Modified analogin_init function to take correct value for ChannelsBank depends on ADC pin.
This commit adds ADC Bank_B usablity to STm32L152RE. With this commit PB_2 can also woak as ADC_IN.
@affrinpinhero-2356 affrinpinhero-2356 changed the title STM32: driver/ADC: Modified analogin_init function to take correct value for ChannelsBank depends on ADC pin. STM32L152: Added ADC Bank_B functionality May 24, 2021
@adbridge
Copy link
Contributor

@affrinpinhero-2356 you have modified the PR template and changed it's format, could you please correct it.

Corrected.

I'm afraid you haven't. See this one for how it should look:
#14692

@jeromecoutant
Copy link
Collaborator

@adbridge template looks good!

@affrinpinhero-2356
Copy link
Contributor Author

Is this good to start CI.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 2, 2021

CI started

@mbed-ci
Copy link

mbed-ci commented Jun 2, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@0xc0170 0xc0170 merged commit 045c48d into ARMmbed:master Jun 2, 2021
@mergify mergify bot added release version missing When PR does not contain release version, bot should label it and we fix it afterwards and removed ready for merge labels Jun 2, 2021
@mergify
Copy link

mergify bot commented Jun 2, 2021

This PR does not contain release version label after merging.

@0xc0170 0xc0170 added release-type: patch Indentifies a PR as containing just a patch and removed release version missing When PR does not contain release version, bot should label it and we fix it afterwards labels Jun 2, 2021
affrinpinhero-2356 added a commit to affrinpinhero-2356/mbed-os that referenced this pull request Jun 2, 2021
Modified print_adc function to update adc pin_map.
This patch will update python script that generate
'peripheralPin.c'. Which will give functionality to
gernerate ADC pin definition for BANK_B. This commit
is related to ARMmbed#14669.
fix:
* https://github.com/STM32-OSF/mbed-os/issues/3

Signed-off-by: Affrin Pinhero <[email protected]>
affrinpinhero-2356 added a commit to affrinpinhero-2356/mbed-os that referenced this pull request Jun 2, 2021
Modified print_adc function to update adc pin_map.
This patch will update python script that generate
'peripheralPin.c'. Which will give functionality to
gernerate ADC pin definition for BANK_B.
This script update is related to
ARMmbed#14669

Signed-off-by: Affrin Pinhero <[email protected]>
@mbedmain mbedmain added release-version: 6.12.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants