Skip to main content
GKulk
Visitor II
May 29, 2019
Question

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

  • May 29, 2019
  • 1 reply
  • 699 views

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 topic has been closed for replies.

    1 reply

    Erwan YVIN
    ST Technical Moderator
    June 28, 2019

    Hello Gururaj ,

    Did you solve your issue ?

    What is the value of RTCCNT when the interrtupr is occuring

    Best regards

    Erwan

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.