S32K312 RTC ISSUE

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K312 RTC ISSUE

2,542 次查看
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 项奖励
回复
3 回复数

2,000 次查看
subhani
Contributor I

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

0 项奖励
回复

1,997 次查看
danielmartynek
NXP TechSupport
NXP TechSupport
0 项奖励
回复

2,524 次查看
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 项奖励
回复