SysStatus_t RTCInit(void)
{
Rtc_Ip_TimedateType defaultTimeDate = {1970,1,1,0,0,0};
NVIC_SetPriority(RTC_IRQn,2);
Rtc_Ip_Init(0, &RTC_0_InitConfig_PB_BOARD_InitPeripherals);
RTCDate_t dateNow = RTCGetDate();
if( defaultTimeDate.year > dateNow.year &&
defaultTimeDate.month > dateNow.month &&
defaultTimeDate.day > dateNow.day)
{
Rtc_Ip_SetTimeDate(0,&defaultTimeDate);
}
Rtc_Ip_EnableInterrupt(0,RTC_IP_COUNTER_INTERRUPT);
Rtc_Ip_StartCounter(0);
return SYS_SUCCESS;
}
I am trying to use RTC in S32K344.
above is my init function.
clock is enabled with clk src0
freeze mode enabled.
This issue is I do not see in increment in time even if the counter is ebabled.