2017-03-12 11:27 PM
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?
#usart1 #freertos #cube-mx #interrups2017-03-14 03:57 AM
Hello,
Please update your CubeMx version to 4.20 then check if you have same behavior with the new version.
Could you please attach your .ioc file to check your case.
Thanks
Imen
2017-03-15 05:12 AM
2017-03-15 06:11 AM
Hello Imen.
Reproduced with CubeMX 4.20.0. Steps to reproduce:
1. Create CubeMX project for STM32468I-EVAL.
2. Pinout.
USART1 - Asynchronous.SYS - Timebase source TIM1.FREERTOS - Enabled.3. Configuration.
USART1, NVIC settings. Global interrupt enabled.NVIC. USART1 Global interrupt. By default it is filled: Enabled Priority 5 Sub priority 0 Uses FREERTOS functions OnUncheck Uses FREERTOS functions. Priority is automatically changed to 0.
Press OK, save project, exit.Open project again.
Configuration, NVIC. USART1 Global interrupt is still: Enabled Priority 5 Sub priority 0 Uses FREERTOS functions OnI don't see Attach function here, CubeMX project content will be sent as plain text.
2017-03-16 03:49 AM
Hi Alex Farber,
Your issue is reported internally for further investigation.
Regards
Imen
2018-01-16 12:57 AM
Hi
Farber.Alex
,
I was trying to reproduce the issue you highlighted on top of CubeMX4.23 (the lastest one) and the reload of the project is correct (with the parameters previously saved : NVIC/USART1 global interrupt with preemption priority set to 0 as unticked box 'uses FreeRTOS functions' ).
Please, update your CubeMX release and tell me if you still have the issue.
BR. Jeanne