MKL02Z32VFG4 wake up from deep sleep using INT4 and INT5 pin

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

MKL02Z32VFG4 wake up from deep sleep using INT4 and INT5 pin

Jump to solution
698 Views
ralphdeffke
Contributor II

Hi there,

being under time pressure as everybody, I whant to take the chance and ask if somebody can guide me directly to the hints of this concept and howto.

We just changed over the processor type to Freescale for the 32kB of program flash in that small package and project is far behind schedule because of this.

Thank you very much

Ralph

Labels (1)
Tags (1)
0 Kudos
1 Solution
520 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Ralph Deffke,

    Whether can use the PTA7(IRQ4) and PTB0(IRQ5) to wake up the deep sleep mode, it is determined by which deep sleep mode you are using.

    In KL02, the deep sleep includes STOP, VLPS, VLLS1-3  low power mode.

   To STOP and VLPS mode, you can use the PTA,PTB interrupt to wake up the deep sleep mode, but to VLLSx mode, you just can wakeup from enabled LPTMR input source or RESET pin.

For details, please refer to the KL02 reference manual, page 174:

65.jpg

Actually, in our FRDM-KL02 sample code, there has a project about the low power, you can refer to it.

FRDM-KL02Z Sample Code Package

You can find the code from folder:kl02-frdm-demo\build\iar\KL02_LowPower_Demo

If you want to use PTA7 and PTB0 to wake up the Stop and VLPS mode, just configure the PORTA and PORTB and it's interrupt, but take care, you can't use PTA7 and PTB0 to wake up the VLLSx mode.

If you still have question, please contact me!

Have a great day,

Jingjing

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

View solution in original post

0 Kudos
3 Replies
520 Views
ryanlush
Contributor IV

I am unable to wakeup using PB3 pin change interrupt. I am just toggling from RUN and STOP based on the interrupt. Push the button, go to STOP, push it again, RUN. I can see I'm getting interrupts when I'm in RUN but after I go to STOP I don't get interrupts. If I stop the debugger I can see I'm stopped at the statement just after I go to STOP, then if I start the debugger again I am back in RUN and a push of the button fires the interrupt that would have put me back in RUN.

I don't see any settings necessary to get it to wake from STOP based on an interrupt. I know the debugger changes the behavior a bit but I have tried it without the debugger and I still get the same results.

0 Kudos
521 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Ralph Deffke,

    Whether can use the PTA7(IRQ4) and PTB0(IRQ5) to wake up the deep sleep mode, it is determined by which deep sleep mode you are using.

    In KL02, the deep sleep includes STOP, VLPS, VLLS1-3  low power mode.

   To STOP and VLPS mode, you can use the PTA,PTB interrupt to wake up the deep sleep mode, but to VLLSx mode, you just can wakeup from enabled LPTMR input source or RESET pin.

For details, please refer to the KL02 reference manual, page 174:

65.jpg

Actually, in our FRDM-KL02 sample code, there has a project about the low power, you can refer to it.

FRDM-KL02Z Sample Code Package

You can find the code from folder:kl02-frdm-demo\build\iar\KL02_LowPower_Demo

If you want to use PTA7 and PTB0 to wake up the Stop and VLPS mode, just configure the PORTA and PORTB and it's interrupt, but take care, you can't use PTA7 and PTB0 to wake up the VLLSx mode.

If you still have question, please contact me!

Have a great day,

Jingjing

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

0 Kudos
520 Views
mjbcswitzerland
Specialist V

Hi

See the following:

http://www.utasker.com/kinetis/LLWU.html

However, note that the KL02 - as exception - has no Low Leakage Wakeup Unit.

If you want to wake up from deep sleep (but not low leakage) any asynchronous interrupt can be used.

IRQ_4 is PTA7 and IRQ_5 is PTB0 - most devices don't call tham IRQs but the KL02 only implements port interrupts on a reduced number of pins so they are named as PTyz/IRQ_x to make it clearer.

You can thus wake from a deep sleep mode on any edge on these ports.

The technique is the same as in the link apart from specifying PORT_INTERRUPT instead of WAKEUP_INTERRUPT.

Note further that it is possible to specify a unique user interrupt handlers for every pin, although the pins of a port actually share an unique interrupt vector.

Regards

Mark

0 Kudos