RTC only remember few hours on battery

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

RTC only remember few hours on battery

Jump to solution
492 Views
_bjs
Contributor III

Hello,

I have custom board with external battery and RTC. RTC is stored in memory correct by power-on and by user. After power-off and power-on checking RTC time and date, everything is correct. When i come back the next day, RTC time is gone. 

I am using 3.3V coin on VDD_SNVS_IN. 

I have based my program from the example project "evkbimxrt1050_snvs_hp_rtc".

None of these example projects are using SNVS config pins:

_bjs_0-1661156369847.png

Do i need to use these pins?

What am i doing wrong?

I am using the following API:
SNVS_LP_SRTC_SetDatetime(...);
SNVS_LP_SRTC_GetDatetime(...);

Maybe I need to use ?:
SNVS_HP_RTC_SetDatetime(...);
SNVS_HP_RTC_GetDatetime(...);

0 Kudos
1 Solution
457 Views
_bjs
Contributor III

Problem is fixed:

Originally i was use both LP and HP RTC, and synchronize between the 2.
HP RTC is not made to use to run from battery, LP RTC is (do not use any of the HP RTC API!).
So i removed HP RTC and now i have almost 2 weeks RTC correct on battery.

Wrong Init:

SNVS_LP_SRTC_GetDefaultConfig(&snvsSrtcConfig);
SNVS_LP_SRTC_Init(SNVS, &snvsSrtcConfig);

SNVS_LP_SRTC_StartTimer(SNVS);

SNVS_HP_RTC_GetDefaultConfig(&snvsRtcConfig);
SNVS_HP_RTC_Init(SNVS, &snvsRtcConfig);

/* Synchronize RTC time and date with SRTC and start RTC */
SNVS_HP_RTC_TimeSynchronize(SNVS);
SNVS_HP_RTC_StartTimer(SNVS);


Correct init for running long time on battery:

SNVS_LP_SRTC_GetDefaultConfig(&snvsSrtcConfig);
SNVS_LP_SRTC_Init(SNVS, &snvsSrtcConfig);

SNVS_LP_SRTC_StartTimer(SNVS);

 

View solution in original post

0 Kudos
2 Replies
458 Views
_bjs
Contributor III

Problem is fixed:

Originally i was use both LP and HP RTC, and synchronize between the 2.
HP RTC is not made to use to run from battery, LP RTC is (do not use any of the HP RTC API!).
So i removed HP RTC and now i have almost 2 weeks RTC correct on battery.

Wrong Init:

SNVS_LP_SRTC_GetDefaultConfig(&snvsSrtcConfig);
SNVS_LP_SRTC_Init(SNVS, &snvsSrtcConfig);

SNVS_LP_SRTC_StartTimer(SNVS);

SNVS_HP_RTC_GetDefaultConfig(&snvsRtcConfig);
SNVS_HP_RTC_Init(SNVS, &snvsRtcConfig);

/* Synchronize RTC time and date with SRTC and start RTC */
SNVS_HP_RTC_TimeSynchronize(SNVS);
SNVS_HP_RTC_StartTimer(SNVS);


Correct init for running long time on battery:

SNVS_LP_SRTC_GetDefaultConfig(&snvsSrtcConfig);
SNVS_LP_SRTC_Init(SNVS, &snvsSrtcConfig);

SNVS_LP_SRTC_StartTimer(SNVS);

 

0 Kudos
481 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

SNVS config pins could be left floating.

For you are using HP_RTC demo, it need to use below API functions:

SNVS_HP_RTC_SetDatetime(...);
SNVS_HP_RTC_GetDatetime(...);

And if possible, please to measure the power consumption of VDD_SNVS_IN pin. Please refer below data about SNVS(RTC) related typical current data:

Hui_Ma_0-1661265456132.png

Wish it helps.

Mike

0 Kudos