Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 4 months ago.
RTC Alarm sample code for NUCLEO STM32F104RE
Is there any sample code for alarm setting or perform task like buzzer playing, etc. ?
1 Answer
6 years, 4 months ago.
If you enable tickless mode in Mbed OS 5.9, and then call Thread::wait
it will put the device to sleep automatically and wake it up when it needs to; no need to set RTC alarm yourself.
If you really want the RTC Alarm, see https://github.com/janjongboom/stm32-standby-rtc-wakeup (but note that if you don't put the MCU in standby mode it'll wake up every millisecond for SysTicks).