2025-06-09 4:57 AM
Hello,
I have found various guides on how to configure the RTC as wakeup-source. However, they do not seem to apply to the C0 family.
In the CubeIDE I cannot find the depicted settings on RTC, (most notably, no option to select internal wakeup and configure wakeup counter and clock)
Is this not implemented on the C0 family?
I just want my MCU to wake up from sleep mode every x milliseconds. What else can I do to implement this on a C011?
Thanks
Lucas
2025-06-09 6:26 AM - edited 2025-06-09 6:29 AM
You can set a periodic RTC alarm to exit sleep mode or stop mode. For standby mode, you may use IWDG for periodic self-wakeup if the standfby period is reasonably small. Examples are in my C0 repository and register level guide: FrankBau/stm32c0
hth
KnarfB
2025-06-10 2:09 AM
Ah, I wasn't aware that this existed.
Thank you, this is super helpful!
To clarify, I would like to use Stop Mode. So no need for IWDG I guess.
I guess that I can use the "rtc_alarm_irq - set a periodic RTC alarm interrupt, used to toggle a LED once per minute" project and build upon that. But instead of toggling the LED I return from Stop mode.
I am quite unexperienced in using sleep modes on stm32 MCUs. While I found some material about this (also was looking at your stop_uart project and the standby_iwdg project), I am still struggling to understand how to realize an implementation like this.
Can you lead me to any material regarding exiting stop mode from RTC interrupt that can push me in the right direction?
Thanks
Lucas