cancel
Showing results for 
Search instead for 
Did you mean: 

Need some help with STM32L4 RTC

Clyde_S
Associate III

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

5 REPLIES 5

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

STTwo-32
ST Employee

Hello @Clyde_S and welcome to the ST Community :smiling_face_with_smiling_eyes:.

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.

Did you forget a link or an attachment to your reply?

 

Clyde

STTwo-32
ST Employee

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.

Who would have guessed!  That the mcu doesn't run out of source code nor libraries!  What a carefully guarded secret!