Wakeup MCU from lowpower mode in RTOS

  1. I’m using STM32L4R5ZIT6 MCU on RTOS.
  2. I kept MCU in low power mode using SUPPRESS_TICKS_AND_SLEEP.
  3. I have enabled the external interrupt before calling Suppress ticks and sleep.
  4. On the external interrupt, MCU wakeup from sleep mode but it does not starts the threads.

My question,

  1. Is it possible to wake-up MCU using external interrupt?
  2. If yes, then what is wrong in my steps?


#2 looks suspicious. Are you calling portSUPPRESS_TICKS_AND_SLEEP() in your code? If so, you’re not supposed to do that. If you enable tickless idle, then the idle task calls portSUPPRESS_TICKS_AND_SLEEP() when conditions permit.

#4 could be an issue. Are you doing anything in the ISR to make task(s) ready? For example, you might send direct-to-task notifications or put something into a queue or signal a semaphore. If you don’t do something in the ISR to make task(s) ready, then FreeRTOS will just go back to sleep and not resume any task(s).