RT1050 keeping RTC across power cycles?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RT1050 keeping RTC across power cycles?

ソリューションへジャンプ
3,670件の閲覧回数
jackking
Senior Contributor I

Hopefully this is just a dumb question, but I don't see any of the SDK samples to demonstrate keeping the RTC running across power cycles.

I am using an imxrt1052 with VBAT_IN (VDD_SNVS_IN) fed by a 3V coin cell.

I tried setting and then commenting out the call to: SNVS_HP_RTC_SetDatetime(SNVS, &rtcDate);

but the clock is still reset after a power cycle.

Is there something I am missing to keep RTC running across cycles?

1 解決策
3,504件の閲覧回数
jackking
Senior Contributor I

OK, that at least pointed me in the right direction.  The SDK sample "snvs_lp_srtc" demonstrates syncing the hp_rtc and the lp_rtc.  I was able to confirm that this sample does allow using the RTC across power cycles with a coin cell connected.

It does require commenting out the lines that set the lp_rtc after the first execution:

    /* Set SRTC time to default time and date and start the SRTC */
//    SNVS_LP_SRTC_SetDatetime(SNVS, &srtcDate);
//    SNVS_LP_SRTC_StartTimer(SNVS);

元の投稿で解決策を見る

3 返答(返信)
3,504件の閲覧回数
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Jack King

From the Reference manual:

SNVS_HP is in the chip's power supply domain and thus receives power along with the rest of the chip, which is off when the system power is down.

If the SNVS_LP power input is connected to an uninterrupted power supply, the GPR value is maintained when the main SoC is powered off.

pastedImage_1.png

I hope this info helps you.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
-------------------------------------------------------------------------------

3,505件の閲覧回数
jackking
Senior Contributor I

OK, that at least pointed me in the right direction.  The SDK sample "snvs_lp_srtc" demonstrates syncing the hp_rtc and the lp_rtc.  I was able to confirm that this sample does allow using the RTC across power cycles with a coin cell connected.

It does require commenting out the lines that set the lp_rtc after the first execution:

    /* Set SRTC time to default time and date and start the SRTC */
//    SNVS_LP_SRTC_SetDatetime(SNVS, &srtcDate);
//    SNVS_LP_SRTC_StartTimer(SNVS);
3,504件の閲覧回数
jackking
Senior Contributor I

Bumping this...  nobody has used the RTC with battery backup before?

0 件の賞賛
返信