VLPS mode

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

VLPS mode

2,710 Views
pietrodicastri
Senior Contributor II

Good morning

I am working with the MK02FN128VFM10

I use the POWER_SYS_SetMode( epower_mode_vlps, kPowerManagerPolicyAgreement );

The epower_mode_vlps is my index to the right power mode. I verify the entered mode is the vlps and the

return valu is kPowerManagerSuccess.

The function is called during the initialization before the main loop. After the call the execution stops there and

the main loop is not reached. That's normal.

I initialize the LPTIMER, the SYS_TICK and the PIT0. All of the interrupt are serviced when the vlps mode is entered.

I expect the clocks should be stopped in vlps, so no SYS_TICK and no PIT0 should be serviced.

Why is it happening???

Thank You

Labels (1)
Tags (2)
0 Kudos
Reply
6 Replies

2,175 Views
pietrodicastri
Senior Contributor II

Hello Zhou

I successfully enter the mode.

If I read in the pi0 interrupt SMC->PMSTAT I get 4;

I cannot measure the current in the processor

The value 4 means VLPR,...

Comments

Pietro

0 Kudos
Reply

2,175 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Pietro di Castri,

      If the state is VLPR,  not VLPS , core clock, NVIC, PIT are all working, please refer to Table 7-2. Module operation in low power modes in K02P64M100SFARM.pdf.

      You phenomena is correct in VLPR.

      If you want see you code reach while(1), you can add some code in your while(1) .

     Wish it helps you!

    


Have a great day,
(my name)

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

0 Kudos
Reply

2,175 Views
pietrodicastri
Senior Contributor II

Good morning

I would still like to have a support...

Thank You everybody

Pietro

0 Kudos
Reply

2,175 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Pietro di Castri,

      Could you tell me which code you are using? KSDK?

     After you enter the PIT interrupt, did you check your SMC_PMSTAT register, just check it, whether you are really enter in VLPS.

     Besides, whether your power consumption is lower than run mode?

Regards,

Jingjing

0 Kudos
Reply

2,175 Views
pietrodicastri
Senior Contributor II

Hello Jingjing Zhou

Thank You for the follow up.

Here is the stub of code.

     __disable_irq();

    g_xtal0ClkFreq = 0U;

    g_xtalRtcClkFreq = 0U;

     OSA_Init();

    power_mode_switching_init( );

    CLOCK_SYS_Init( g_defaultClockConfigurations, 2,

                   &clockCallbackTable, ARRAY_SIZE(clockCallbackTable));

    power_manager_error_code_t ret;

    clock_manager_error_code_t retclk = CLOCK_SYS_UpdateConfiguration( CLOCK_CONFIG_INDEX_FOR_VLPR, kClockManagerPolicyForcible );

    ret = POWER_SYS_SetMode( epower_mode_run, kPowerManagerPolicyAgreement );

    ret = POWER_SYS_SetMode( epower_mode_vlpr, kPowerManagerPolicyAgreement );

    pit0_init();

    pit0_start();

    __enable_irq();

    SMC_HAL_SetPstopMode( SMC_BASE, kSmcPstopStop );

ret = POWER_SYS_SetMode( epower_mode_vlps, kPowerManagerPolicyAgreement );

    while(1)

    {

    }

If I place a brekpoint in the pit0 isr routine I see the service execution. The SLEEPONEXIT is activated,

The while(1) is never reached,

The return value are all successfull...

What is your opinion ???

Thank You

0 Kudos
Reply

2,175 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Pietro di Castri,

    Are you sure your VLPS is entered successfully?

    Did you check the MCU power consumption?

    If enter the VLPS, except the LPTIMER can works,  PIT and systick can't work. Are you sure your interrupt is have after your VLPS is entered, not happen before enter VLPS?

    Please give me more details.


Have a great day,
Jingjing

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

0 Kudos
Reply