cancel
Showing results for 
Search instead for 
Did you mean: 

'Nucleo-F401fb + stm32CubeMX + iar ewarm' can not run azure RTOS

zoro
Associate

"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:

  1. Why is it possible to use Azure RTOS easily with stm32CubeMX on Nucleo-F429ZI, but not on Nucleo-F401RE?
  2. What could be the cause of this issue, and how can it be resolved?"

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

2 REPLIES 2
KDJEM.1
ST Employee

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.

KDJEM1_0-1715183987630.png

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.

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