i.MX8 SRTC API access from M4

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

i.MX8 SRTC API access from M4

Jump to solution
1,784 Views
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 Kudos
Reply
1 Solution
1,764 Views
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.

View solution in original post

4 Replies
1,779 Views
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 Kudos
Reply
1,770 Views
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 Kudos
Reply
1,765 Views
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,758 Views
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 Kudos
Reply