Skip to main content
f4_kiddo
Associate II
March 12, 2022
Question

STM32F401RE - ThreadX won't wake up from sleep - Azure RTOS

  • March 12, 2022
  • 3 replies
  • 1897 views

Here's the code of my app_threadx.c file.

https://pastebin.com/qj8ZUYg3

I followed the STM32 AZURE RTOS workshop for the H7 MCUs, however, I'm currently developing on a STM32F401RE.

Basically, when I debug the program the function it's called and then go to sleep, despite the fact of it doesn't wake up, so it doesn't work as a thread anymore.

I don't know if there's any timer problem, I've set TIM10 as timebase source because I can't use the SysTick due STM software constraints (to avoid any conflict with the SysTick interrupt handler).

I think it could be a library problem, however I don't know what can I do except these basic things.

Thanks in advance!

This topic has been closed for replies.

3 replies

Walid ZRELLI
Visitor II
March 16, 2022

Hello @f4_kiddo​ ,

You can refer to the following example provided under X-Cube-AZRTOS-F4 Package:

I hope this helps.

BeST Regards,

Walid

f4_kiddo
f4_kiddoAuthor
Associate II
March 28, 2022

Thanks, I will report the solution found by @KR51K​ :

I think I found the answer: in my project the Priority Group in "System Core"->"NVIC" was set to "0 bits", so I changed his to "4 bits". and afterwards set the "Preemption Priotity" for the "Time base: TIM6 global interrupt..." from "0" to "15". 

Hope this helps you

Basically this was the only setting that was missing in my project.

Explorer
December 2, 2024

Thanks!!!!. I am using NUCLEO f411re and this solved my problem.