s32k146 RTC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s32k146 RTC

865 Views
JE_2P
Contributor I

Hi, I am using s32k146 microcontroller. I was working with an application using the RTC module, but I'm getting troubles with it.

I based my code on the RTC example, but RTC is not working.

The RTC Time Seconds Register (TSR) value increases rapidly.

And the TPR (RTC Time Prescaler Register) value increases irregularly.

rtc_timedate_t timeConfig = {

    .year       = 2016U, 

    .month      = 1U, 

    .day        = 1U, 

    .hour       = 0U,        /*!< Hour       */

    .minutes    = 0U,      /*!< Minutes    */

    .seconds    = 0U      /*!< Seconds    */

};

 

void RtcInit(void)

     const rtc_init_config_t rtcUserCfg0 = {

          .compensationInterval = 0U, 

          .compensation = 0,

          .clockSelect = RTC_CLK_SRC_OSC_32KHZ, 

          .clockOutConfig = RTC_CLKOUT_DISABLED, 

          .updateEnable = true, 

          .nonSupervisorAccessEnable = true

          }; 

  RTC_DRV_Init(RTCTIMER1,&rtcUserCfg0);

  RTC_DRV_SetTimeDate(RTCTIMER1,&timeConfig);

  RTC_DRV_StartCounter(RTCTIMER1);

}

 

I would like to know why the TSR value increases rapidly. 

Please let me know the setting values for CLKIN port, RTC Initialization, rtcclk, etc.

It would be helpful if I receive a help in this regard.

Thanks in advance.

 

0 Kudos
1 Reply

843 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi JE_2P,

Would you please attach your project here, so that I can check it faster.
I have test rtc_alarm_s32k146 of S32SDK_for_S32K1xx_RTM_3.0.3 with S32DS ARM2.2 on S32K146EVB RevB did not find the issue.

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos