S32K312 RTC ISSUE

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

S32K312 RTC ISSUE

974 Views
subhani
Contributor I

Writing the time and are working fine.

while reading the time and date, year also changing like seconds from 1970 to whatever the value im giving in year variable.


If I am writing the year as 1970 and reading the time and date is fine the year is not changing in this case. But if i write other than 1970 it is starting to change.

I am attaching the screen recorded video and my project please provide solution as possible. 

0 Kudos
3 Replies

432 Views
subhani
Contributor I

can I get example project for RTC with API interrupt and alarm interrupt.

0 Kudos

429 Views
danielmartynek
NXP TechSupport
NXP TechSupport
0 Kudos

956 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @subhani,

The result_buf struct must not be read before the Rtc_Ip_GetTimeDate() function is complete, becasue result_buf->year is reset to 1970 every time the function called. The driver then calculates the correct year.

danielmartynek_0-1704810518666.png

 

 

Regards,

Daniel

0 Kudos