2024-01-15 06:55 AM
I am trying to set up a multichannel ADC and following YouTube tutorials to create it.
However, the STM32 IDE will not allow me to set preemption priority to 1.
Similarly, I cannot set the clock prescaler as divided by 2.
I need to make a multichannel with at least 2 analogue pins (potentially more), yet even 2 ADC channels cannot work separately.
Other similar nucleo boards (on YouTube) could do this without a problem. How can I solve both these issues?
2024-01-15 07:27 AM - edited 2024-01-15 07:36 AM
on F411 , i tried nvic -> dma priority to 3 :
and ADC to 5:
no problem. (just mouse click on the field ..)
+
the greyed out divider 2 : Cube prevents you to set it to a speed too high for this ADC.
+
>yet even 2 ADC channels cannot work separately.
ADC working with a sequence, you can set/define in Cube. (read rm, how ADC is working).
What is "separately" here for you ? Starting just one channel at a time ?
Then set the sequence just to one element, converting this channel.
If to convert another channel, change the selected channel for this "regular conversion" and start it; then it converts that channel. (Or use injected conversion...many ways are possible.)
2024-01-15 07:29 AM
Hello,
Which CubeMx you're using?
I didn't reproduce the first issue with CubeMx V6.10.0:
For the second question, the popup provides you the answer. You're not respecting Fadc min max constraints. So you need to select the value 4 or more.
2024-01-15 07:30 AM
Perhaps you don't have any bits available for preemption priority. What priority group are you using? It's not shown in your screenshot, perhaps it needs resized to fit.
The ADC prescaler can't be 2 based on your clock settings. There are limits on the maximum ADC speed. CubeMX is probably correct to disallow this, but it might be a bug. Impossible to know without seeing your clock settings.
Attach your IOC to investigate.
2024-01-15 07:32 AM
What is the Priority Group you've selected for NVIC?