Skip to main content
Visitor II
January 15, 2024
Solved

NUCLEO F411RE, interrupt preemption priority is not available.

  • January 15, 2024
  • 4 replies
  • 1785 views

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. 

niru_0-1705330259946.png

Similarly, I cannot set the clock prescaler as divided by 2. 

niru_1-1705330324783.png

 

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?

 

    This topic has been closed for replies.
    Best answer by TDK

    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.

    TDK_0-1705332646744.png

    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.

    4 replies

    Super User
    January 15, 2024

    on F411 , i tried nvic -> dma priority to 3 : 

    AScha3_0-1705332321998.png

    and ADC to 5:

    AScha3_1-1705332595784.png

     

     

    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.)

    Technical Moderator
    January 15, 2024

    Hello,

    Which CubeMx you're using?

    I didn't reproduce the first issue with CubeMx V6.10.0:

    SofLit_0-1705332567606.png

     

    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.

    TDKAnswer
    Super User
    January 15, 2024

    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.

    TDK_0-1705332646744.png

    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.

    Technical Moderator
    January 15, 2024

    What is the Priority Group you've selected for NVIC?

    SofLit_1-1705332714404.png