Problem reading RESETCAUSE register on LPC55S36

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

Problem reading RESETCAUSE register on LPC55S36

跳至解决方案
1,671 次查看
EnBono
Contributor I

Hi,

I'm working on a LPCXpresso55S36 evaluation board, and I'm trying to read the PMC->RESETCAUSE register to get the last chip reset reason, however it's value is always zero. I started from the demo project "power_mode_switch_lpc" in SDK 10.2.2 and I've tried to add a simple printf as follow in main function:

PRINTF("Last Reset cause: %d\n",PMC->RESETCAUSE);

At power-on, I expected that last reset cause was POR, so the value should be "1", but the printed value was"0". After RTC wakeup the device from the "Deep power down mode", i expected that  "DPD_EVENTS_ORDER" bits was set as "010b" (RTC) and the "DPDRESET_RTC" bit was set to "1", but also in this case the printed value was always "0".

Am i missing something? How could i get info about last reset cause?

Thanks

Enrico

标签 (2)
0 项奖励
回复
1 解答
1,603 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls use the code like:

#include "fsl_power.h"

power_reset_cause_t p_reset_cause;
power_boot_mode_t p_boot_mode;
power_wakeup_pin_t p_wakeupio_cause;

POWER_GetWakeUpCause(&p_reset_cause, &p_boot_mode, &p_wakeupio_cause);
__asm("nop");

 

xiangjun_rong_0-1662361506717.png

This function within the drivers provided checks the reset source using the AOREG1 register of the PMC.

reset_cause_reg = PMC->AOREG1;

Hope it can help you

BR

XiangJun Rong

 

在原帖中查看解决方案

4 回复数
1,659 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I have tried to read the RESETCAUSE register on LPC55S36, I also get zero even if I press Reset button, I will continue to investigate the cause soon.

BR

XiangJun Rong

0 项奖励
回复
1,633 次查看
EnBono
Contributor I

Hi @xiangjun_rong,

Any news about this problem?

BR

Enrico

0 项奖励
回复
1,604 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls use the code like:

#include "fsl_power.h"

power_reset_cause_t p_reset_cause;
power_boot_mode_t p_boot_mode;
power_wakeup_pin_t p_wakeupio_cause;

POWER_GetWakeUpCause(&p_reset_cause, &p_boot_mode, &p_wakeupio_cause);
__asm("nop");

 

xiangjun_rong_0-1662361506717.png

This function within the drivers provided checks the reset source using the AOREG1 register of the PMC.

reset_cause_reg = PMC->AOREG1;

Hope it can help you

BR

XiangJun Rong

 

1,616 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I have asked AE team why the register reading is always zero.

I will give you a response after I get feedback

BR

XiangJun Rong

0 项奖励
回复