2024-04-27 03:38 AM
"I successfully ran a simple Azure RTOS task using nucleo-f429zi, stm32cubemx, and iar ewarm 9.30. However, when I apply the same method to nucleo-f401re, it gets stuck in the tx_thread_sleep function. It seems that the OS Tick interrupt might not be occurring properly. Therefore, I have the following questions:
Thanks in advance.
Solved! Go to Solution.
2024-05-09 03:29 PM
Hi, Kaouthar
I've resolved the issue. The problem was due to the NVIC's "Priority Group" being set to "0 bits for pre-emption priority, 4 bits for sub priority". After changing the setting to "4 bits for pre-emption priority, 0 bits for sub priority", everything started working properly.
On Nucleo-F429ZI, when adding Azure RTOS, CubeMX correctly sets it to "4 bits for pre-emption priority, 0 bits for sub priority". However, on Nucleo-F401RE, when Azure RTOS is added, it defaults to "0 bits for pre-emption priority, 4 bits for sub priority", and I'm not sure why.
Thank you for your willingness to help.
zoro
2024-05-08 09:08 AM
Hello @zoro and welcome to the community :),
Could you please precise which STM32CubeMx version are you using?
You can use X-CUBE-AZRTOS-F4 using STM32CubeMX 6.11.1 and Nucleo-F401RE as shown in the below figure.
Could you please take a look at this FAQ may help you How to export a project configuration to a compati... - STMicroelectronics Community
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-05-09 03:29 PM
Hi, Kaouthar
I've resolved the issue. The problem was due to the NVIC's "Priority Group" being set to "0 bits for pre-emption priority, 4 bits for sub priority". After changing the setting to "4 bits for pre-emption priority, 0 bits for sub priority", everything started working properly.
On Nucleo-F429ZI, when adding Azure RTOS, CubeMX correctly sets it to "4 bits for pre-emption priority, 0 bits for sub priority". However, on Nucleo-F401RE, when Azure RTOS is added, it defaults to "0 bits for pre-emption priority, 4 bits for sub priority", and I'm not sure why.
Thank you for your willingness to help.
zoro