Problem with returning from LLS mode after power off.

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

Problem with returning from LLS mode after power off.

671 Views
jensmadsen
Contributor I

I have a problem with MK24FN256 after going to LLS mode. It continues after a wakeup as it should, and works ok if power stays connected after programming. Also, it works after reset, as long as power stays connected.

But if power is disconnected and connected again, then it does not work. It goes into power down, but when it should return, it poweres up and use 5.7mA. It do not continue in the code.

I have followed guide AN4503: /external-link.jspa?url=http%3A%2F%2Fcache.nxp.com%2Ffiles%2F32bit%2Fdoc%2Fapp_note%2FAN4503.pdf

The code works for all VLLS modes. But for LLS mode, it only works if power stays connected to the programmer after programming. As soon as power is disconnected, and connected again, it does not return after LLS wakeup. It do wake-up but goes into a power consuming state using 5.7mA. The LLWU isr runs, if it is enabled. And it continues to run. If it is not enabled, it just use 5.7mA without executing code.

Code is attached.

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

546 Views
jensmadsen
Contributor I

It seems strange that it works when code is uploaded from debugger, but not when power is disconnected, and reconnected. I was wondering if it is some debug registers, that need to be reset.

0 Kudos

546 Views
jensmadsen
Contributor I

It is difficult for me to see what I am missing.

It works if I call WFI instruction (normal wait mode).

But, if I call stop (set SCB_SCR_SLEEPDEEP before WFI) then it hangs.

However, it do work just after programming, if I not disconnect power. Also, if I do a pin reset, so it is reset by normal pin-reset, as long as I not disconnects power.

But, when I disconnect power, a bit seems to swap, and it hangs at stop. And it continues to hang, also if I do pin reset. So in this case it hangs, even if I do a normal pin reset.

It must be a register, that is not initialized by reset, since reset not solves the problem.

What registers are not initialized by reset, and could make stop not working?

Normal, all registers have a default value after reset. But here, a register (maybee hidden?) helds its value, since it remembers the error!

I am able to get VLLS modes to work, since they do an automatic restart. But in LLS where a reset is not done, it hangs after stop. It do not continue in the code.

0 Kudos

546 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

In KSDK, there is a power switch demo

SDK_2.2_TWR-K24F120M\boards\twrk24f120m\demo_apps\power_mode_switch.

It shows how to switch between different power mode. Please check it.

Regards,

Jing

0 Kudos