Skip to content

Alarm B on Systime #1034

Answered by altishchenko
xExecutioner asked this question in Q&A
Discussion options

You must be logged in to vote

@xExecutioner I think you should have a look into the rtc-board.c file, where RTC HAL manipulations are done. You can take RtcStartAlarm() function as a starting point - just omit the reverse calculations from ticks into RTC_ structures, use your own conversions from SysTime structure, if you are using it. Don't forget to modify RTC_IRQHandler() in the same file to call your alarm function on ALARMB execution. It should be a separate function, not the one called HAL_RTC_AlarmAEventCallback() (calls TimerIrqHandler()) or bad things will happen.
And of course you can modify the registers on the fly, but you don't want that, really.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by xExecutioner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants