AnsweredAssumed Answered

Cannot change USART1 interrupt priority in CubeMX

Question asked by Farber.Alex on Mar 13, 2017
Latest reply on Jan 16, 2018 by Jeanne Joly

In CubeMX 4.19.0 I have USART1 Asynchronous and FREERTOS enabled. USART1 global interrupt is enabled. In NVIC configuration dialog I have:

USART1 global interrupt: On, Preemption priority 5, Sub priority 0, Uses FREERTOS functions On.

 

Actually, in my program USART1 interrupt handler doesn't use FREERTOS  functions. I want to change the interrupt priority. So, I change it by the following way:

USART1 global interrupt: On, Preemption priority 3, Sub priority 0, Uses FREERTOS functions Off.

 

Save the project, exit and open it again. USART1 and NVIC are signed with red. When I open NVIC, the following message is shown:

 

Preemption priority of interrupts should be >=5 if their handlers call system functions. See FREERTOS_LIBRARY_MAX_SYSCALL_INTERRUPT parameter.

 

When NVIC is opened, I see the following parameters:

USART1 global interrupt: On, Preemption priority 3, Sub priority 0, Uses FREERTOS functions On.

 

So, CubeMX keeps incorrect value of "Uses FREERTOS functions", and in this case priority 3 is not allowed. Is this bug in CubeMX? Is there any way to save this priority value without CubeMX warning?

Outcomes