2023-07-11 09:26 AM
2023-07-13 12:39 AM - edited 2023-07-13 01:46 AM
Hello @LMehm ,
I recommend you, when you configure the RTC, to follow the steps shared in this FAQ: How to configure the RTC to wake up the STM32 periodically from Low Power modes.
In this article we will see how to configure the RTC peripheral of the STM32 to wake up the STM32 periodically from a low power mode like STOP2 mode which is one of the lowest power modes of the STM3L4.
Also, I advise you to take a look to this wiki: Getting started with RTC.
This article explains how to use the RTC. It provides code examples to use RTC Alarm with interrupt with NUCLEO-L476RG board.
When your question is answered, please close this topic by choosing "Accept as Solution". This will help other users find that answer faster.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-07-13 01:37 AM
For the simplest example of a "once per second" alarm, the article presents the worst approach with an unreliable implementation - the code reconfigures the alarm every second and, if this code is interrupted for more than a second, then the alarm stops working at all.
Similarly for UART those articles doesn't show an actually real life usable reception example, because with the flawed-by-design HAL it is almost impossible.
And, of course, the all of the code examples in knowledge base articles are similarly full of bugs, issues and generally dumb code. Here is an example:
2023-07-13 01:59 AM
if you just want to get interrupt every each second by RTC.
you can use Alarm mode and enable all mask in alarm setting but this function require a calendar.
but if you want it wakeup that you have to make sure it's in sleep mode.