Skip to content

Enabling ADC3 peripheral in stm32f303 family MCUs #61263

Answered by gautierg-st
flabou asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @flabou,

The problem lies in the fact that ADC1 and ADC2 share the same interrupt line (18) on STM32F303 while ADC3 and ADC4 use respectively line 47 and 61. On STM32F303, by default the Kconfig ADC_STM32_SHARED_IRQS is enabled. This allows using both ADC1 and ADC2. But it prevents the use of ADC3 and ADC4.

You can have up to 3 active ADC by disabling this Kconfig. In this case, you'll have access to ADC3, ADC4 and either one of ADC1 or ADC2 (but not both). Unfortunately, there is yet no existing way in Zephyr to handle such cases of mixed interrupt sharing so we have to workaround it.

Hope this helps!

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@flabou
Comment options

Comment options

You must be logged in to vote
3 replies
@flabou
Comment options

@gautierg-st
Comment options

@flabou
Comment options

Answer selected by flabou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area: ADC Analog-to-Digital Converter (ADC) platform: STM32 ST Micro STM32
3 participants