SPC input to WUU not waking device

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

SPC input to WUU not waking device

151 Views
robert_hines
Contributor II

[Working with MCXN947]

I have voltage detect interrupts enabled (resets disabled) in SPC in both low-power and active modes (resets disabled, bandgaps enabled).

SPC0->ACTIVE_CFG:  3f101615
SPC0->LP_CFG:      3f221515
SPC0->VD_IO_CFG:   0000000a
SPC0->VD_SYS_CFG:  0000000a
SPC0->VD_CORE_CFG: 0000000a

I've enabled SPC as a wake-up source in the WUU (WUU->ME bit is set).

The SPC interrupt works in active mode, but not in power-down mode, i.e. the processor doesn't wake to handle the SPC interrupt.

Labels (1)
Tags (1)
0 Kudos
Reply
3 Replies

94 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi @robert_hines 

 

  1. The wake-up latency from Power-down mode is expected to be longer than the interrupt response time in Active mode. In Power-down mode, most of the MCU is in a static state. One of the trade-offs of entering a deeper low-power mode is the increased latency when entering and exiting that mode.

  2. Regarding the issue where the interrupt only occurs once, I suspect there may be an issue in the application code handling. Could you please refer to the power_mode_switch example included in the SDK and compare the implementation with your code?

If the issue still persists, please provide a simple project that can reproduce the problem on the FRDM-MCXN947 board. I will be happy to investigate it further.

Thank you.

 

BR

Alice

0 Kudos
Reply

45 Views
robert_hines
Contributor II

The context is:

- FreeRTOS port

- Going into power-down mode with PM_EnterLowPower(<some amount of time>) using a low-power timer.

- IRQHandlers use setFromISR() and portYIELD_FROM_ISR()

- a high-priority task is waiting for the event bits set from ISR, xEventGroupWaitBits()

- some interrupts are routed through the WUU so that they are available in powerdown mode, including some external pins (seem to work fine) and some internal modules (VBAT, LPTMR, TDET, SPC) that seem to work fine, with the exception of SPC being slow/unresponsive.

- The SPC interrupt is disabled in the IRQHandler and re-enabled after being processed in the high-priority task that is waiting for event bits to be set.  This waiting task also calls PM_EnterLowPower() again after processing event bits.

The "problem" is that the SPC interrupt doesn't respond like the others.  When it does wake up the processor, it goes back to sleep and doesn't trigger again.  When it goes off in active mode, it does keep firing (PM_EnterLowPower() can't put the processor back into powerdown mode).

0 Kudos
Reply

98 Views
robert_hines
Contributor II

I think it may be working, but there's a large difference in the response between active and power-down mode.  In active mode, the SPC interrupt will respond more quickly and go off repeatedly, but from power-down mode, it takes much longer to trigger the interrupt and it only triggers once.

0 Kudos
Reply