cancel
Showing results for 
Search instead for 
Did you mean: 

I am using SPC560B60L3 micro controller. RTC interrupt is not setting as per the desired time out value

GKulk
Associate

Below is the code snippet,

   RTCModule->RTCC.B.RTCIE = RTC_DISABLE;

   RTCModule->RTCC.B.CNTEN = RTC_DISABLE;

   RTCModule->RTCC.B.DIV512EN = RTC_DISABLE;

   RTCModule->RTCC.B.DIV32EN = RTC_DISABLE;

   u32RTCcount = (u32Seconds * 64000) >> 10;

   RTCModule->RTCC.B.RTCVAL = u32RTCcount;

   RTCModule->RTCC.B.RTCIE = RTC_ENABLE;

   RTCModule->RTCC.B.CNTEN = RTC_ENABLE;

Here u32Seconds  is 600. After programming this, I expect RTCCNT should set the interrupt after 600 counts. But interrupt is occurring at 517 counts.

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 REPLY 1
Erwan YVIN
ST Employee

Hello Gururaj ,

Did you solve your issue ?

What is the value of RTCCNT when the interrtupr is occuring

Best regards

Erwan