LPC43 resets

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

LPC43 resets

761 次查看
MrHause
Contributor I

Hi,

I'm using the LPC4357 and sometimes it restarts (very rarely). I also use the RTC and after this reset, the RTC is initialized to default values. I perform initialization when oscillator that provides 32kHz for RTC, is not enabled. It is set in CREGO register. It means that I initialize RTC when CREG0 is reset and it also means that this MCU reset performs the CREG reset at the same time. According to the documentation:

doc.PNG

there is only one type of reset that for sure reset CREG0 and there are some resets that perform "partial" reset of the CREG. There is no information in the documentation, what "partial" exactly means. I suspected the BOD reset but the ENABLE register is 0. So it is disabled. 

Are there any other causes that can perform MCU reset  and reset the CREG at the same time?

What can cause the Power on Reset during work which can reset my CREG? 

Regards

标签 (1)
0 项奖励
3 回复数

733 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

This problem is caused by POR reset.

BOD doesn't reset CREG but POR does.

You can solve the problem with below code.

LPC_CREG->CREG0
&= ~((1 << 3) | (1 << 2));     /* Reset 32Khz oscillator */
       LPC_CREG->CREG0
|= (1 << 1) | (1 << 0); /* Enable 32 kHz & 1 kHz on

 

Hope this helps,

Jun Zhang

0 项奖励

729 次查看
MrHause
Contributor I

That's what I have exactly in my code when I do the RTC initialization. I do not make initialization every single time when the device is power up. Firstly I check whether the RESET32KHZ and PD32KHZ bits in CREG0 are set. If they are set to 1, it means the CREG0 has been restarted and then I do RTC init. But it's not what I'm asking for.


The problem is that my code sometimes restarts. The RTC reinitialization is just a trace that this emerging reset performs a CREG0 reset. So I can eliminate other types of resets. I'm trying to find out what can cause the CREG0 reset.


If only the Power on Reset can cause the CREG0 reset, I would like to ask you what can be the reasons of the Power on Reset? What can causes the PoR?

0 项奖励

712 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

POR doesn’t occur when Vbat = ON and VCC = OFF. It only occurs during power on (VCC from 0 to VDD).

Here is some Q&A you may also concern:

1. If Vbat = ON and VCC = OFF, does 32KHz stop?

>> No.
2. If Vbat = ON and VCC = OFF, does RTC stop?

>> No

to avoid POR reset CREG0, the only way is to use deep power down mode rather than power off the board. deep power down mode won't reset CREG0.

 

Hope this helps,

Jun Zhang

 

 

 

 

0 项奖励