K70 Not entering Wait mode

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

K70 Not entering Wait mode

937 Views
lourdu_xavier
Contributor II

Hi All,

I am very new to Kinetis, I am trying to implement Low power mode, We are using MK70FN1M0VMJ15.

I tried to put the system to Wait mode using "_lpm_set_operation_mode (LPM_OPERATION_MODE_WAIT)" looks it's not working,
got stuck in _lpm_set_cpu_operation_mode() as it waiting PMSTAT register status to go for wait mode (4)

SO I read the register values to check

SMC_PMSTAT => 0x1 -- set to run mode

SMC_PMPROT => 0x2a (low power mode enabled) code compilation flag for LPM enabled.
SMC_PMCTRL => 0x40 set to wait mode – (I read this register before setting wait mode; the STOPA bit not set)

waited long time but SMC_PMSTAT not changing to Wait mode.

I saw the other threads and reference doc, I could not find what I am missing.

Please help to find the issue. Thanks in advance.

Xavier

4 Replies

770 Views
lourdu_xavier
Contributor II

Thanks Mark,

This helps a lot, I will check and update the results.

0 Kudos
Reply

770 Views
mjbcswitzerland
Specialist V

Hi Xavier

WAIT mode doesn't involve the SMC so I would check that you are not trying to set a different mode than expected.
SMC_PMCTRL of 0x40 is "very low power run mode" and will only be accepted when the clocks are correct for this mode (eg. Flash clock max. 1MHz) so it may also be normal that it is not moving to that state if you haven't adjusted the clocks correctly prior to commanding it.

This may help: http://www.utasker.com/kinetis/LLWU.html
and some low power videos:
- https://youtu.be/kWNlsAoMly4
- https://youtu.be/iZEMRiDmHzw
- https://youtu.be/v4UnfcDiaE4


Regards

Mark

Complete Kinetis solutions, training and support: http://www.utasker.com/kinetis.html
Kinetis K70:
- http://www.utasker.com/kinetis/TWR-K70F120M.html
- http://www.utasker.com/kinetis/EMCRAFT_K70F120M.html

770 Views
lourdu_xavier
Contributor II

Thanks Mark,

Your input helps a lot. I removed the check to wait on SMC_PMCTRL, and made few changes referring code under PE_LDD_VERSION flag. Now I can go to Wait and Sleep mode. I could not set to 2Mhz(system got crashed, I will check later) but I can set to 12 Mhz. 

Can you help me with one more, From wait mode device came out for Gpio key press but from Sleep mode it is not. Is there any GPIO setting to set as wakeup source or something like that for sleep mode.

Thanks 

0 Kudos
Reply

770 Views
mjbcswitzerland
Specialist V

Hi Xavier

It is not clear exactly which modes your are using but there is a difference between modes that can be woken by normal interrupt (like a GPIO interrupt) and those (low leakage modes) that can't. The second ones can only be woken by a LLWU (low leakage wake-up) event - see the link that I gave in the first post which looks at LLWU.

If you don't make progress quickly download the uTasker project from GITHUB since it contains a complete low power solution for K70 (and all others) [plus USB, Ethernet and drivers and the ability to simulate the chip] so you'll not need to experiment too long.

If you are starting a professional development consider the professional version since it will greatly cut development time and costs and give you personal support when needed to ensure a successful outcome.

Regards

Mark

0 Kudos
Reply