Skip to content

Adc channel bank support #1293

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

Merged
merged 2 commits into from
Feb 9, 2021
Merged

Adc channel bank support #1293

merged 2 commits into from
Feb 9, 2021

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Feb 8, 2021

For STM32L1xx, in Cat.3, Cat.4, Cat.5 and Cat.6 devices there are up to 42 multiplexed channels organized in 2 banks.
Channels ADC_IN0 to ADC_IN31 are available in Bank A and channels ADC_IN0b to ADC_IN31b are available in Bank B.

This PR manages the ADC channel bank thanks the PeripheralPins.c

Example for the Nucleo L152RE:

-  {PB_2,  ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0b, 0)}, // ADC_IN0b
+  {PB_2,  ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CHANNEL_BANK_B, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0b

/cc @jeromecoutant

@fpistm fpistm added enhancement New feature or request fix 🩹 Bug fix labels Feb 8, 2021
@fpistm fpistm added this to the 2.0.0 milestone Feb 8, 2021
@fpistm fpistm requested a review from LMESTM February 8, 2021 14:08
For STM32L1xx, in Cat.3, Cat.4, Cat.5 and Cat.6 devices
there are up to 42 multiplexed channels organized in 2 banks.
Channels ADC_IN0 to ADC_IN31 are available in Bank A and
channels ADC_IN0b to ADC_IN31b are available in Bank B.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
For STM32L1xx, in Cat.3, Cat.4, Cat.5 and Cat.6 devices
there are up to 42 multiplexed channels organized in 2 banks.
Channels ADC_IN0 to ADC_IN31 are available in Bank A and
channels ADC_IN0b to ADC_IN31b are available in Bank B.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Copy link
Member

@LMESTM LMESTM left a comment

Choose a reason for hiding this comment

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

LGTM !

@fpistm fpistm merged commit 4aa0163 into stm32duino:master Feb 9, 2021
@fpistm fpistm deleted the ADC_channel_bank branch February 9, 2021 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fix 🩹 Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants