RTC only remember few hours on battery

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

RTC only remember few hours on battery

跳至解决方案
503 次查看
_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 项奖励
1 解答
468 次查看
_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 项奖励
2 回复数
469 次查看
_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 项奖励
492 次查看
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 项奖励