cancel
Showing results for 
Search instead for 
Did you mean: 

Find out a wakeup source on STM32H7

AlexSmart
Senior

Im trying to put STM32H743 in stop mode with wakeup from external interrupt.

So far core wakes up immediately after

HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFE);

EXTI_CPUPRx registers all set to 0, so what wakes up the CPU? Is there any additional falgs that indicates the wakeup source?

14 REPLIES 14

For lack of answers to your questions, just a blind shot: try WFI...

JW

AlexSmart
Senior

As I find out debugger gets core out of WFE. When I removed all breakpoints core remains in sleep. Same with WFI, but here only "stop debugging" gets core out of WFI.

However, with WFE without debug core wakes up one time (exactly one time) for no obvious reason.

FColl.1
Associate III

Did you figure this out in the end? I'm struggling with the same sort of issue. I got standby and wake from standby working but can not get it to enter the stop mode with WFE. If I try WFI it goes into stop but will not wake up. Is there a good description that explains how all these events and interrupts and wakeups work together? The datasheet and ref manual offer a fragmented view of if all and I do not have the brain power to synthesize a good programmers model from that. Unfortunately the example code does not show a very common use case which is go to sleep/stop/standby on a button press then wake on the same button. From what I can discern wake and event and interrupt signals are three different things.

For the benefit of anyone else who finds this... if you are using an rtos. Then try  osKernelLock(); before setting up your stop mode configuration. It seems the scheduler was stopping WFE working for some reason, probably my stop configuration code was being preempted. Now to try to make it wake up again....

Unfortunately no, I put this one aside, as I have couple more issues with H7 I'm trying to solve