2394624_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2394624_en-US

2394624_en-US

MCXA266: WUU wake-up flags are 0 after Deep Power-Down wake-up (SRS=0x4010, SSRS=0x4011)

Hello,

I am investigating WUU wake-up behavior from Deep Power-Down mode on the FRDM-MCXA266 board.

Environment:
- MCU: MCXA266
- Board: FRDM-MCXA266
- SDK Example project: frdmmcxa266_power_mode_switch_ll_mcxa
- SDK version: 26.6.000
- Development environment: MCUXpressoIDE_25.6.136

I added the following code near the beginning of main() to read the reset and wake-up status before BOARD_InitHardware() is called.

/*******************************************************************************
 * Variables
 ******************************************************************************/

char *const g_modeNameArray[] = APP_POWER_MODE_NAME;
char *const g_modeDescArray[] = APP_POWER_MODE_DESC;
uint32_t resetCount;
uint32_t resetStatus;
uint32_t resetStickyStatus;
uint32_t wakeupResource;
uint32_t wuuWakeupPinsFlag;

/*******************************************************************************
 * Code
 ******************************************************************************/

int main(void)
{
    uint32_t freq;
    app_power_mode_t targetPowerMode;
    bool needSetWakeup = false;
    
    // --- START ADDED CODE ---
    resetStatus = CMC_GetSystemResetStatus(CMC);
	resetStickyStatus = CMC_GetStickySystemResetStatus(CMC);
	CMC_ClearStickySystemResetStatus(CMC, resetStickyStatus);
	wakeupResource = CMC_GetWakeupSource(CMC);
	wuuWakeupPinsFlag = WUU_GetExternalWakeUpPinsFlag(WUU0);
	WUU_ClearExternalWakeUpPinsFlag(WUU0, wuuWakeupPinsFlag);
	// --- END ADDED CODE ---
    
	BOARD_InitHardware();
	
	// --- START ADDED CODE ---
    DbgConsole_Printf("CMC_GetSystemResetStatus(CMC) = 0x%x\r\n", resetStatus);
	DbgConsole_Printf("CMC_GetStickySystemResetStatus(CMC) = 0x%x\r\n", resetStickyStatus);
	DbgConsole_Printf("CMC_GetWakeupSource(CMC) = 0x%x\r\n", wakeupResource);
	DbgConsole_Printf("WUU_GetExternalWakeUpPinsFlag(WUU0) = 0x%x\r\n", wuuWakeupPinsFlag);
	// --- END ADDED CODE ---
	APP_SetVBATConfiguration();
    APP_SetSPCConfiguration();
    APP_InitWaketimer();

The complete relevant output is:
```
Normal Boot.

########################### Power Mode Switch Demo ###########################
Core Clock = 240000000Hz
Power mode: Active

Select the desired operation

Press A to enter: Active mode
Press B to enter: Sleep mode
Press C to enter: DeepSleep mode
Press D to enter: PowerDown mode
Press E to enter: DeepPowerDown mode

Waiting for power mode select...

Deep Power Down: The whole VDD_CORE voltage domain is power gated.

Please select wakeup source:
Press A to select TIMER as wakeup source;
Press B to select WAKE-UP-BUTTON as wakeup source;

Waiting for wakeup source select...
Wakeup Button Selected As Wakeup Source.
Please press SW2 to wakeup.
Isolate power domains: VDD_USB.

CMC_GetSystemResetStatus(CMC) = 0x4010
CMC_GetStickySystemResetStatus(CMC) = 0x4011
CMC_GetWakeupSource(CMC) = 0x0
WUU_GetExternalWakeUpPinsFlag(WUU0) = 0x0

Normal Boot.
```


At the initial startup, the following values were printed:

CMC_GetSystemResetStatus(CMC) = 0x110
CMC_GetStickySystemResetStatus(CMC) = 0x110
CMC_GetWakeupSource(CMC) = 0x0
WUU_GetExternalWakeUpPinsFlag(WUU0) = 0x0

I then selected Deep Power-Down mode, selected WAKE-UP-BUTTON as the wake-up source, and pressed SW2.

The MCU successfully woke up, and the application restarted, but the following values were printed:

CMC_GetSystemResetStatus(CMC) = 0x4010
CMC_GetStickySystemResetStatus(CMC) = 0x4011
CMC_GetWakeupSource(CMC) = 0x0
WUU_GetExternalWakeUpPinsFlag(WUU0) = 0x0

My interpretation of the CMC reset status is:

- 0x00004010: Software Reset + Warm Reset
- 0x00004011: Software Reset + Warm Reset + Deep Power-Down Wake-up Reset

If this interpretation is correct, the sticky status appears to indicate that a Deep Power-Down wake-up reset occurred first, followed by a software warm reset.

I checked the application startup code, system_MCXA266.c, and the example sources, but I could not find NVIC_SystemReset(), SYSRESETREQ, or an SCB->AIRCR write.
I also added a counter to SystemInitHook() using a retained NOLOAD variable. SystemInitHook() was executed only once after wake-up, so I could not find evidence of a software reset after SystemInit().

My questions are:

  1. Is SRS = 0x4010 and SSRS = 0x4011 expected after a WUU wake-up from Deep Power-Down?
  2. Does the MCXA266 Boot ROM or Extended Bootloader issue a software warm reset before the application starts?
  3. What is the recommended method for identifying which WUU pin caused the Deep Power-Down wake-up?

My current interpretation of the CMC reset status is as follows, but please correct me if I have misunderstood the bit definitions:
English is not my first language, so please let me know if any part of my explanation is unclear.

Thank you.

MCXARe: MCXA266: WUU wake-up flags are 0 after Deep Power-Down wake-up (SRS=0x4010, SSRS=0x4011)

Hello @ka-2020 

Thanks for your question. I will reproduce the test on my side using the same setup and investigate the behavior. Once I have the results, I will get back to you with my findings and answers to all of your questions.

Thank you for your patience and support.


BR

Alice

Re: MCXA266: WUU wake-up flags are 0 after Deep Power-Down wake-up (SRS=0x4010, SSRS=0x4011)

Hello  @Alice_Yang 

Thank you for looking into this issue.

I performed an additional test using another WUU external wake-up pin and wanted to share the result.

I added the following configuration in addition to the original wake-up button configuration:

WUU_SetExternalWakeUpPinsConfig(APP_WUU, 0, &wakeupButtonConfig);

I then woke the device from Deep Power-Down using the pin assigned to WUU pin 0. The device woke up successfully, but I observed the same result as before:

CMC_GetSystemResetStatus(CMC) = 0x4010
CMC_GetStickySystemResetStatus(CMC) = 0x4011
CMC_GetWakeupSource(CMC) = 0x0
WUU_GetExternalWakeUpPinsFlag(WUU0) = 0x0

Therefore, this behavior does not seem to be specific to the original SW2 WUU pin.

Do you have any updates on the investigation?
Please let me know if you need any additional logs, source code, register values, or test results from my side.

Thank you.

Re: MCXA266: WUU wake-up flags are 0 after Deep Power-Down wake-up (SRS=0x4010, SSRS=0x4011)

Hello @ka-2020 

Thanks for your reply and patience.

I have tested this on my side according to your requirements and have also discussed it with our internal team. Since clarification regarding the ROM behavior requires confirmation from the ROM team, it took some additional time to investigate. I apologize for the delayed response and appreciate your understanding.

1. Is SRS = 0x4010 and SSRS = 0x4011 expected after a WUU wake-up from Deep Power-Down?

->> Yes.  

SSRS: Stores all sources of system reset that has generated a system reset since the last MAIN cold reset and that you have not cleared. SSRS does not update following a core software reset. 

SRS: Updates on every MAIN warm reset to indicate the type/source of the most recent reset.

2. Does the MCXA266 Boot ROM or Extended Bootloader issue a software warm reset before the application starts? ->> NO. 

3. What is the recommended method for identifying which WUU pin caused the Deep Power-Down wake-up? ->> 

For identifying the wake-up source pin, WUU_GetExternalWakeUpPinsFlag() is suitable for Power Down mode, where the WUU interrupt service routine  can execute normally. However, it  is can not used after a Deep Power-Down wake-up, because the device restarts through a reset sequence and the WUU flags have already been cleared.

By the way, are you using only one wake-up pin, or do you have multiple wake-up pins enabled?


Thank you.


BR

Alice

Re: MCXA266: WUU wake-up flags are 0 after Deep Power-Down wake-up (SRS=0x4010, SSRS=0x4011)

Hi @ka-2020 

Thanks for your reply.

I have escalated this issue and your requirement to our internal SE team with high priority. We fully understand the importance of this request and are actively following up on it.

Please give us some time to investigate further. I will keep you updated and get back to you as soon as possible.

Thank you for your patience and understanding.


BR

Alice

Re: MCXA266: WUU wake-up flags are 0 after Deep Power-Down wake-up (SRS=0x4010, SSRS=0x4011)

Hello @Alice_Yang

Thank you for looking into this and for the clarification.

Based on your explanation, it seems that the WUU flags are cleared during the Deep Power-Down reset sequence before the application starts.

In my test, two WUU external wake-up pins were enabled: the original SW2 wake-up pin and WUU external wake-up pin 0.

Just to confirm, does this mean that there is no software method to identify which WUU pin caused the wake-up after Deep Power-Down?

Thank you.

Re: MCXA266: WUU wake-up flags are 0 after Deep Power-Down wake-up (SRS=0x4010, SSRS=0x4011)

Hi @ka-2020 


Thank you for your patience.

The root cause has been identified, and a fix will be implemented in future sample chip revisions.

We apologize for any inconvenience caused and appreciate your understanding.

Thank you.


BR

Alice

Re: MCXA266: WUU wake-up flags are 0 after Deep Power-Down wake-up (SRS=0x4010, SSRS=0x4011)

Hello @Alice_Yang ,

Thank you for the update.

I understand that the fix is planned for a future sample chip revision.

Thank you for your support.

Tags (1)
No ratings
Version history
Last update:
Friday
Updated by: