2024-01-11 12:11 PM
I have a very simple example of using the RTC. My trouble is I never get an interrupt when the alarm time comes.
Clearly there is something very basic I am not getting quite right. Many, if not all of the examples mentioned in this forum and included in the demos are not building software with STMCube IDE, nor are they using the HAL calls at the highest level. I trying to avoid low level calls if possible. (This is the environment I am most comfortable with.)
Perhaps someone here could kindly lend a hand. Thank you for listening.
Clyde
2024-01-11 12:20 PM - edited 2024-01-11 12:21 PM
Even if you are comfortable with writing code using Cube/HAL, the mcu does not work out of source code nor libraries, but it works out of the registers. So read out and check content of RTC registers, find out if it runs at all, if alarm time is properly set and alarm is enabled, if interrupts are enabled, if the ISR has the name it has to have etc.
Some general "interrupt does not fire" checklist here.
JW
2024-01-11 12:47 PM - edited 2024-01-11 01:32 PM
Hello @Clyde_S and welcome to the ST Community 😊.
You can refer to the following example wish configure an RTC alarm using the RTC HAL API and CubeIDE (as well as Keil and IAR). For more details, it will be a good idea to debug the code and check exactly how it works.
Best Regards.
STTwo-32
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.
2024-01-11 01:13 PM
Did you forget a link or an attachment to your reply?
Clyde
2024-01-11 01:33 PM
Sorry @Clyde_S
I've added the link.
Best Regards.
STTwo-32
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.
2024-01-28 04:29 AM
Who would have guessed! That the mcu doesn't run out of source code nor libraries! What a carefully guarded secret!