Hello NXP experts,
We are using RTC alarm as wakeup source on imx8dxl SoC,
with SCU (imx-scfw-porting-kit-1.18.0) and IMX-ATF (lf-6.1.1-1.0.0).
Working use case (for reference)
1, call sc_timer_set_rtc_alarm()
2, call sc_irq_enable(, SC_IRQ_GROUP_RTC,..)
3, put SoC in suspend mode via ATF
4, when alarm occurs, the system wakes up and jumps to expected entry point.
Problematic use case (with System Reset)
1, call sc_timer_set_rtc_alarm()
2, do system reset via ATF or reset caused by watch dog timeout, then SoC resets
3, call sc_irq_enable(, SC_IRQ_GROUP_RTC,..)
4, put SoC in suspend mode via ATF
5, Alarm does not trigger (system stays suspended).
(we configured other pad wakeup source, it can wake up if the pad event occurs.)
Observation:
- Date setting (via `sc_timer_set_rtc_time()` in ATF) is preserved after reset.
- But alarm setting seems lost after reset.
Questions
1. Does RTC Alarm setting persist across **SoC resets**? If yes, what prerequisites are needed?
2. For the failed flow above, is there a missing step (e.g., explicit RTC/SRTC sync) before reset?
From below page:
<https://community.nxp.com/t5/i-MX-Processors/i-MX8-SRTC-API-access-from-M4/m-p/1405915>
We understand the SCU handles all RTC and SRTC sync.
SCU will transfer any pending alarms from the RTC to the SRTC.
The SCU keeps RTC and SRTC synchronized so that the RTC date and alarms are kept during low power states.
Looking forward to your replies.
Thank you.
Best regards,