Problem reading RESETCAUSE register on LPC55S36

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

Problem reading RESETCAUSE register on LPC55S36

ソリューションへジャンプ
1,669件の閲覧回数
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,601件の閲覧回数
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,657件の閲覧回数
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,631件の閲覧回数
EnBono
Contributor I

Hi @xiangjun_rong,

Any news about this problem?

BR

Enrico

0 件の賞賛
返信
1,602件の閲覧回数
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,614件の閲覧回数
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 件の賞賛
返信