Debug session prevent from VLPS

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Debug session prevent from VLPS

509件の閲覧回数
adamkulpa
Contributor I

Hello,

I have a problem with invoking Very Low Power Stop (VLPS) state in KL02Z microprocessor. I use PEMicro Multilink debugger interface for flash programming. Code contains usage of VLPS, provided by KINETIS-SDK v2.3

status_t power_mode_status;


SMC_PreEnterStopModes();

  /* switch to Deep Sleep (VLPS) mode */
  power_mode_status = SMC_SetPowerModeVlps(SMC);

  if (power_mode_status != (status_t)kStatus_Success)
  {
    /**
     * @note With debug enabled, transitions from Run directly to VLPS result in the system entering
     *       Stop mode instead. Status bits within the MDM-AP Status register
     *       can be evaluated to determine this pseudo-VLPS state.
     */
    PRINTF("VLPS FAIL: %d", power_mode_status);

    ret = 1U;
  }

  SMC_PostExitStopModes();‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

My routine looks as follows:

1. Upload flash image by debugger interface and GDB session

2. Close session in GDB

3. Unplug the debugger

4. Performs RESET by using the MCU pin

5. My Code is running, and function

SMC_SetPowerModeVlps(SMC);

 returns status code: 3900 which indicate that previous trial fail and STOPA flag is set. I don't have any pending interrupts.

By this moment everything works according to documentation:

9.6 Debug in low-power modes

....

With debug enabled, transitions from Run directly to VLPS result in the system entering
Stop mode instead. Status bits within the MDM-AP Status register can be evaluated to
determine this pseudo-VLPS state.

But why after reset my MCU still thinks that debug is enabled. Does reset should not clean debug?

My case is quite specific, because the programming takes place under battery power, which I can not disconnect.

I really need to be able of programming flash by debugger and use VLPS.

How can I disable debug or indicate MCU that debug session after uploading is over?

Are there any flags / settings that disable the "emulated STOP state"?

 

0 件の賞賛
1 返信

377件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi,

Yes, with debug enabled, transitions from Run directly to VLPS result in the system entering Stop mode instead. If you want to enter VLPS with debug enabled, Please transitions from Run --> VLPR -->VLPS. This is still possible.

Regards

Jing 

0 件の賞賛