i.MX8 SRTC API access from M4

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

i.MX8 SRTC API access from M4

跳至解决方案
1,636 次查看
petar_petrov
Contributor II

Greetings,

I would like to know first if my understanding is correct that the sc_timer APIs are for the RTC, while the SNVS_ APIs are for the SRTC. If my assumption is correct, can the SRTC APIs be accessed from our application on the M4, or what more needs to be done to achieve that otherwise? Thanks in advance!

Best regards,

Petar

0 项奖励
回复
1 解答
1,616 次查看
seb_haezebrouck
NXP Employee
NXP Employee

Is that also possible with the RTC?

Yes.

Upon going to sleep the SCU will transfer any pending alarms from the RTC to the SRTC. This allows alarms to still occur at the correct time when the system is running only on the SNVS domain. You will wakeup at the expected date. RTC and SRTC being synchronized, the "RTC date" will be correct also.

在原帖中查看解决方案

4 回复数
1,631 次查看
seb_haezebrouck
NXP Employee
NXP Employee

For all practical purpose, you must use the sc_timer_xxx_rtc_xxx API. The SNVS_xxx functions are not meant to be used from an SCFW client (the CM4 in your case).

The sc_timer_xxx_rtc_xxx API do target the RTC. The SCU keeps RTC and SRTC synchronized so that the RTC date and alarms are kept during low power states.

0 项奖励
回复
1,622 次查看
petar_petrov
Contributor II

Hello,

The reference manual states that only the SRTC keeps counting when in SNVS-only mode, correct? We want to be able to put the device to sleep and periodically wake up and do temperature compensation, so we would need to know the current time when the wake up occurs. Is that also possible with the RTC? Furthermore, we would like to access (from the M4 app and bootloader) the two General Purpose regs in the SNVS - LPGPR2 and LPGPR3.

0 项奖励
回复
1,617 次查看
seb_haezebrouck
NXP Employee
NXP Employee

Is that also possible with the RTC?

Yes.

Upon going to sleep the SCU will transfer any pending alarms from the RTC to the SRTC. This allows alarms to still occur at the correct time when the system is running only on the SNVS domain. You will wakeup at the expected date. RTC and SRTC being synchronized, the "RTC date" will be correct also.

1,610 次查看
petar_petrov
Contributor II

Ah, I see, thanks for the valuable information! How can we access the LPGPR2 and 3 registers in the SNVS, because we would like to store calibration data for the periodic wakeup and compensation? Should I post another thread for this topic?

0 项奖励
回复