s32k312 RTC time never changes RTC interrupts can be generated

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

s32k312 RTC time never changes RTC interrupts can be generated

跳至解决方案
1,831 次查看
guochuan
Contributor III

hi all

The project uses the internal RTC, the configured clock uses the external 32768Hz, the interrupt of RTC can be generated normally, call Rtc_Ip_GetTimeDate function, the obtained time is kept unchanged, check the clock is enabled, call Rtc_Ip_SetTimeDate function can write the time normally.

clock config:

guochuan_0-1678521584986.png

  • The function call flow is configured as follows

guochuan_1-1678521737339.png

Please help guide where the problem might be

thanks

0 项奖励
回复
1 解答
1,775 次查看
guochuan
Contributor III

hi @Robin_Shen 

thank you reply.

Yes, RTC registers are always counting. Using Rtc_Ip_GetTimeDate to get the time is always constant.

guochuan_0-1678842235877.png

guochuan_1-1678842284019.png

rtc does not run without debugging.

guochuan_3-1678842952311.png

Please help guide, thank you.

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,784 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi 

Sorry for the delay.
Did you observe the RTC register during debugging to check whether the counter is increasing?
Is the data obtained by Rtc_Ip_GetTimeDate normal when not debugging?


Best Regards,
Robin

0 项奖励
回复
1,776 次查看
guochuan
Contributor III

hi @Robin_Shen 

thank you reply.

Yes, RTC registers are always counting. Using Rtc_Ip_GetTimeDate to get the time is always constant.

guochuan_0-1678842235877.png

guochuan_1-1678842284019.png

rtc does not run without debugging.

guochuan_3-1678842952311.png

Please help guide, thank you.

 

0 项奖励
回复
1,738 次查看
guochuan
Contributor III

The problem of RTC has been solved. AUTOSAR MCAL does not support the configuration of RTC. The test is normal after manual configuration。

0 项奖励
回复