Configuring RTC Alarm A in Binary Mode on STM32WL for LoRa Project
Hello fellow developers,
I'm currently working on a project using the STM32WL board and a LoRa application. I've encountered an issue with the RTC (Real-Time Clock) that's perplexing me, and I hope someone can shed some light on it.
In my project, I'm using the PingPong LoRa example as a starting point, but I'm not entirely sure about its internal RTC configuration. To implement a specific functionality, I need to utilize RTC Alarm A interrupts. The problem is that RTC alarm interrupts work in BCD (Binary-Coded Decimal) mode, while the RTC used in my application (Ping Pong LoRa example) is configured in Binary mode.
Here's the strange behavior I've observed: When I set the alarm for, let's say, 10 seconds, it triggers an interrupt at around 12 seconds, and then another at 5 seconds. This behavior is quite unexpected and is causing issues in my project.
I suspect that my RTC alarm configuration in Binary mode might be incorrect, but I'm not sure how to address this. Can anyone guide me on how to configure the RTC Alarm A in Binary mode for my STM32WL board correctly?
