Author Topic: Device doesn't retain low power configs  (Read 21 times)

Offline Raffaele

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Device doesn't retain low power configs
« on: February 23, 2021, 08:56:50 PM »
Hi,

sorry if the title is misleading.
I'm having issues with programming a KL03. The code that I program the device with has a low power task that periodically moves from VLPW to VLPS, and vice versa.
If I:
Program the device -> Power it off -> Power it on again
Or
Power it on -> Program with recompiled code (even the same exact code, just freshly recompiled)
 it stalls at the beginning (but I think neither in VLPW nor in VLPS, because the power consumption is larger than VLPW and lower than VLPS. I measured  the powers for each state).
Instead, if I:
Program the device -> Power it off -> Power it on -> RE-PROGRAM with the same code (not recompiled), then it works properly, and alternates between VLPW and VLPS.

What could it be?
My intuition is that during reprogramming something gets pulled high/low, probably for a certain amount of time necessary for my device to work properly.  And since this doesn't happen with a simple restart, the device/code gets stuck somewhere

« Last Edit: February 24, 2021, 02:55:04 AM by Raffaele »

Offline Raffaele

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Re: Device doesn't retain low power configs
« Reply #1 on: February 26, 2021, 05:31:47 PM »
any help on what could cause the issue? Is it probably the fnLowPower task , but why would it work in one case (i.e., program device - turn off - turn on - reprogram) and not in the other (program - turn off - turn on)?


EDIT Update: I'm using some interrupt signals and it looks like my code gets stack when I inform that I want to enter VLPS (fnSetLowPowerMode(VLPS_MODE)). At that point, the task doesn't get activated any more when I use uTaskerMonoTimer('j', (DELAY_LIMIT) (5 * SEC), UTASKER_ACTIVATE);
« Last Edit: February 26, 2021, 09:48:33 PM by Raffaele »