Exit LLS mode problem

cancel
Showing results for 
Search instead for 
Did you mean: 

Exit LLS mode problem

941 Views
henryxin
Contributor II

Hi there,

I am testing with KL25Z board about the LLS mode.

and have a question about wake-up the core from Low power modes.

The document <<Using Low Power modes on Kinetis family>>(AN4470) explains that from LLS to Run mode, the trigger condition is "

Wakeup from enabled LLWU pin or module source or Reset pin" at table 6. How to enter LLS mode.

But in the demo chapter, Low power exit modes:

External pin SW2 has been enabled to wake up via the LLWU from any LLS and VLLSx mode, all wakeup

interrupts from these modes must go through LLWU_ISR.

Is there a conflict about these description of exiting the LLS mode?

"Enable LLWU pin" is not equal to "enable LLWU interrupt", such as:

LLWU.png

Or is there anything I misunderstand about LLWU?

Thanks,

Henry Xin

0 Kudos
4 Replies

335 Views
henryxin
Contributor II

Hi Marek, Alice,

Thanks your reply.

I have read the more detailed information about LLWU in the datasheet and <<Power Management for Kinetis MCUs When and how to use Kinetis low-power modes>> document.

I got a summary(Wake-up condition, and exiting action) as following. Can you review them whether they are correct?

  1. External Pin(Configured as Input GPIO) + LLWU (corresponding external pin enable) can wake up the MCU from LLS.Action: When External Pin signal is detected by the LLWU, the MCU will continue running the code after WFI or STOP.(I did have a chance to try this)
  2. External Pin(Configured as Input GPIO) + LLWU (corresponding external pin enable + LLWU interrupt enable) can wake up the MCU from LLS.(In this situation, it is possible, it is possible that some external pin signals will be missed because the external pin interrupt is not enabled).  Action: When External Pin signed is detected by the LLWU, the LLWU interrupt is called (LLWU flag shall be cleared), then the MCU will continue running the code after WFI or STOP.(I did have a chance to try this)
  3. External Pin(Configured as Input GPIO + GPIO interrupt enable) + LLWU (corresponding external pin enable) can wake up the MCU from LLS. Action: When Extenal Pin signal is detected by LLWU, the GPIO interrupt handler is called(GPIO interrupt flag shall be clear), then the MCU will continue running the code after WFI or STOP
  4. External Pin(Configured as Input GPIO + GPIO interrupt enable) + LLWU (corresponding external pin enable + LLWU interrupt enable) can wake up the MCU from LLS. Action: ???(I did have a chance to try this)
  5. Internal Module(Interrupt enable) + LLWU(corresponding Module Enable) can wake up the MCU from LLS. Action: When the internal module interrupt is detected, the Internal Module interrupt handler is called, then MCU will continue running the code after WFI or STOP
  6. Internal Module(Interrupt enable) + LLWU(corresponding Module Enable+LLWU interrupt enable) can wake up the MCU from LLS. Action: When the internal module interrupt is detected, the LLWU interrupt handler is called(the internal module interrupt flag shall be cleared, and the internal module interrupt handle will be called even the the internal module interrupt flag has been cleared), then MCU will continue running the code after WFI or STOP

Thanks,
Henry Xin

0 Kudos

335 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

I have checked your wake-up conditions and actions and I have only following comments:

case #3 - the GPIO interrupt handler may not be invoked when LLWU wake-up the CPU. The GPIO is in static mode in the LLS. In addition, the GPIO (PORT module) interrupt condition can be set differently than LLWU condition for the same pin. See also the description of the LLS mode:

pastedImage_0.png

case #4: The LLWU interrupt will be called when the wakeup interrupt is detected. It is the same case as number 3.

Best Regards,

Marek Neuzil

0 Kudos

335 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Henry ,

"Enable LLWU pin" is not equal to "enable LLWU interrupt" -- yes .

For example , we use the pin to wekeup , when enter the pin , it will enter the LLWU interrupt, then it can wake up the mcu.

you can also refer to :http://cache.freescale.com/files/32bit/doc/app_note/AN4503.pdf?fsrch=1&sr=1  - >

14 LLWU pin and module Wakeup

Hope it helps

Alice

335 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

I am not sure what is not clear about exit of the LLS mode by using LLWU but I recommend to read the reference manual for the KL25Z derivative - Chapter 15 Low-Leakage Wakeup Unit (LLWU). There is detailed description how the LLWU works on KL25Z.

See for example the block diagram and the LLWU features description:

pastedImage_0.png

The LLWU module features include:

• Support for up to 16 external input pins and up to 8 internal modules with individual

enable bits

• Input sources may be external pins or from internal peripherals capable of running in

LLS or VLLS. See the chip configuration information for wakeup input sources for

this device.

• External pin wakeup inputs, each of which is programmable as falling-edge, risingedge,

or any change

• Wakeup inputs that are activated if enabled after MCU enters a low-leakage power

mode

• Optional digital filters provided to qualify an external pin detect. When entering

VLLS0, the filters are disabled and bypassed.

Best Regards,

Marek Neuzil