2021-03-06 09:56 AM
I want to set a RTC alarm to trigger 1 hour from now but there doesn't seem to be a built-in function (using HAL) to add time. Of course 1 hour in the future is easy unless it happens to be almost midnight or worse almost midnight at the end of the month.
Hopefully I have overlooked a simple way to do this
(this is on a STM32L0)
Solved! Go to Solution.
2021-03-06 11:30 AM
If you set RTC_ALRMxR.MSK4, date/day does not enter the alarm comparison. Read Programmable alarms subchapter of RTC chapter in RM, and description of the RTC_ALRMxR registers.
JW
2021-03-06 11:30 AM
If you set RTC_ALRMxR.MSK4, date/day does not enter the alarm comparison. Read Programmable alarms subchapter of RTC chapter in RM, and description of the RTC_ALRMxR registers.
JW
2021-03-06 01:39 PM
I had read through that section but the line
Each calendar field can be independently selected through the MSKx bits
of the RTC_ALRMAR register, and through the MASKSSx bits of the RTC_ALRMASSR
register.
part went over my head.
Thanks a lot.