2019-08-09 11:32 AM
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?