Recovery from VLLS0 in KW21Z

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

Recovery from VLLS0 in KW21Z

582 Views
tomofumiyasuda
Contributor I

I have a problem about recovery from VLLS0(Very Low Leakage Stop0) in KW21Z. Only when I configured GPIOs except for wake up pin as output ports before entering VLLS0, MCU can't recover from VLLS0 by wake up pin. In the case of configuring GPIOs as output ports, it is successful when adding GPIOs configuration before clearing ACKISO after recovery. But, RCM_SRS0(System Reset Status Register 0) register value was 0x00 not 0x01(WAKEUP bit is one). I have no idea that how can I get one value(WAKEUP bit) when I configure GPIOs as output. Do you have any ideas?

Best Regards,

Tom

TY
Labels (1)
0 Kudos
3 Replies

449 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi tomofumiyasuda

Please check the following DOCs:

http://www.nxp.com/assets/documents/data/en/application-notes/AN4503.pdf

https://developer.mbed.org/media/uploads/GregC/an4470-using_low-power_modes_with_kinetis_mcus.pdf

In the section: Power Mode Exit Transition, they describe correct method to exit from Low power modes.

Hope this information helps you
Have a great day,
Jorge Alcala

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

449 Views
tomofumiyasuda
Contributor I

Hi Mark,

Thank you for your response. LLWU pin which I want to use is configured as GPIO(PTC4/LLWU_P12) before entering VLLS0. However, in the case of GPIOs except for LLWU_P12 is output port not default it doesn't work properly. Is there any order to work? I describe my software order below. If I write ports setting before  "(1)Clear ACKISO bit", it work properly.

Brfore VLLS0 mode:

(1)Set ports except for PTC4 as GPIOs(output low)

(2)Set PTC4 as GPIOs(input) and as ISF flag and Interrupt on falling-edge

(3)Set LLWU_PE4 register and LLWU interrupt

(4)Set register for VLLS0 mode

After VLLS0 mode:

(1)Clear ACKISO bit

(2)Set peripheral register I use

Best Regards,

Tom

TY
0 Kudos

449 Views
mjbcswitzerland
Specialist V

Tom

LLUW pins only work if their peripheral function is set to GPIO (there are some pins that don't default to this).

Therefore it is probably that when you set GPIOs as outputs you are also changing the LLWU pin's peripheral function to GPIO, which would then allow it to work.

Therefore (without configuring the other GPIO outputs) try configuring the pin's

PORTn_PCRx register to ensure that it is correctly set to GPIO mode.

Regards

Mark

0 Kudos