RTC only remember few hours on battery

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

RTC only remember few hours on battery

ソリューションへジャンプ
643件の閲覧回数
_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 解決策
608件の閲覧回数
_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 返答(返信)
609件の閲覧回数
_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 件の賞賛
返信
632件の閲覧回数
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 件の賞賛
返信