Does the S32K312 RTC support system time keeping at reset?

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

Does the S32K312 RTC support system time keeping at reset?

ソリューションへジャンプ
1,119件の閲覧回数
liangyouchao
Contributor I

liangyouchao_0-1684227461102.png

My device is battery powered and I found in my testing that a reset also causes the system time to be reset, is there any solution to keep the system time on reset?

0 件の賞賛
1 解決策
1,025件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

I do not have test code, I just tested it using a debugger. All I did - I selected SIRC clock (I do not have a board with XOSC here right now) and I enabled the RTC by CNTEN. Then I can see that the counter is running in RTCCNT:

lukaszadrapa_0-1684822882407.png

Then I generated SW functional reset - also by debugger. I set FUNC_RST in MODE_CONF register,  then I set MODE_UPD bit in MODE_UPD register and finally I wrote keys to CTL_KEY register. The MCU was reset, I reconnected debugger (hot attach without reset) and I saw that the RTC is still configured and running.

Regards,

Lukas

 

元の投稿で解決策を見る

9 返答(返信)
1,091件の閲覧回数
liangyouchao
Contributor I

Hi Lukas,

Thank you for your reply, we use SXOSC crystal.

liangyouchao_0-1684289556445.png

 

Regards,

liangyouchao

0 件の賞賛
1,078件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Please give me more time, I can see that on my side too, I need to clarify this with AE team.I will let you know later.

Regards,

Lukas

0 件の賞賛
1,072件の閲覧回数
liangyouchao
Contributor I
OK, look forward to your feedback.
0 件の賞賛
1,040件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Well, my problem was that I used external reset for test. But external reset is destructive reset. RTC keeps running only during functional resets. If I used software functional reset, for example, it's working as expected.

Which reset did you use?

Regards,

Lukas

0 件の賞賛
1,035件の閲覧回数
liangyouchao
Contributor I

We will use both functional reset and external reset, the reset reset is an external watchdog chip, if the external reset is not holdable, we can also accept this case, can you share the test code with me?

Regards,

liangyouchao

0 件の賞賛
1,026件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

I do not have test code, I just tested it using a debugger. All I did - I selected SIRC clock (I do not have a board with XOSC here right now) and I enabled the RTC by CNTEN. Then I can see that the counter is running in RTCCNT:

lukaszadrapa_0-1684822882407.png

Then I generated SW functional reset - also by debugger. I set FUNC_RST in MODE_CONF register,  then I set MODE_UPD bit in MODE_UPD register and finally I wrote keys to CTL_KEY register. The MCU was reset, I reconnected debugger (hot attach without reset) and I saw that the RTC is still configured and running.

Regards,

Lukas

 

968件の閲覧回数
liangyouchao
Contributor I

Thank you very much, Lukas. I have used the RTD driver to implement that the clock will not be lost when the RTC function is reset.

 

Regards,

liangyouchao

0 件の賞賛
1,013件の閲覧回数
liangyouchao
Contributor I

Okay, I'll try it.

0 件の賞賛
1,096件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @liangyouchao 

which clock do you use?

lukaszadrapa_0-1684252322069.png

 

Regards,

Lukas

0 件の賞賛