cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use a timer to wake up from sleep on the STM32F405RG

AOIjd
Associate

I hope I posted in the right spot. I'm using a STM32F405RG cpu. I can't figure out how to sleep and wake up using the timer. The code I found online uses 'pwr_enter_standby_mode()' which may affect the reason why I can't wakeup. I see in RTClock.h there's an RTClock class which has setPeriodicWakeup and setAlarmATime. The class doesn't seem to be implemented correctly since every second it reports 30-31seconds has elapse. It seems to wake up if I have it wake up immediately. I suspect because the alarm triggers before it gets to standby. But it if doesn't trigger immediately it will never wake up

Is there a sleep I can use instead of standby? Can any of you recommend a different class or function to use to set the alarm and wakeup?

0 REPLIES 0