2021-10-15 07:19 AM
We have been using an STM32L476 in a product that schedules periodic wake times. Recently we have discovered a bug where the unit will go to sleep and never wake back up. What we have noticed is after generating another interrupt to wake the unit up and inspecting the RTC Alarm B register we are using, the HT register has been corrupted or written to inadvertently to a value that doesn't make sense.
For example, one unit was scheduled to wake up at 00:40 (HH:MM) but the register showed 30:40. In the second example, the unit was scheduled to wake up at 08:32 but the alarm showed 38:32. Its like the HT register is getting a 3 put in it occasionally and causing the time to never match programmed time.
I also noticed the PM register is getting set to 1 in these problem units but my code never writes to that parameter. Is there any known issues that I should be aware of that could cause a corruption like this in the RTC alarm?
Solved! Go to Solution.
2021-10-15 07:32 AM
> Is there any known issues
Let me guess: you are using Cube/HAL. Look for improperly initialized "initialization struct".
JW
2021-10-15 07:32 AM
> Is there any known issues
Let me guess: you are using Cube/HAL. Look for improperly initialized "initialization struct".
JW
2021-10-15 10:49 AM
Bingo. I think this is my problem. Thank you!