KW36 lowpower vlls does not work

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

KW36 lowpower vlls does not work

Jump to solution
518 Views
darkblue
Contributor I

when I chose lowpower mode 4, suppose the mcu should be in in VLLS0/1 mode. but it doesn't work.

codes:

bool_t PWRLib_MCU_Enter_VLLSx(uint8_t mode)
{
    bool_t lowpower_skipped = FALSE;
#if cPWR_EnableDeepSleepMode_8 || cPWR_EnableDeepSleepMode_5
    if ( 0 == setjmp(pwr_CPUContext))
#endif
    {
#if cPWR_EnableDeepSleepMode_8 || cPWR_EnableDeepSleepMode_5
    if(gpfPWR_VLLS_EnterCb != NULL)
    {
        gpfPWR_VLLS_EnterCb();
    }
#endif
        LLWU->F1 = LLWU->F1;
        LLWU->F2 = LLWU->F2;
        LLWU->FILT1 |= LLWU_FILT1_FILTF_MASK;
        LLWU->FILT2 |= LLWU_FILT2_FILTF_MASK;
        SCB->SCR &= (uint32_t)~(uint32_t)(SCB_SCR_SLEEPONEXIT_Msk);
        /* Set the SLEEPDEEP bit to enable CORTEX M0 deep sleep mode */
        SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
        SMC->PMCTRL = (uint8_t)((SMC->PMCTRL & (uint8_t)~(uint8_t)(SMC_PMCTRL_STOPM(0x03))) | (uint8_t)(SMC_PMCTRL_STOPM(0x04)));
        SMC->STOPCTRL = (SMC_STOPCTRL_PSTOPO(0x00) | SMC_STOPCTRL_LLSM(mode));
#if (cPWR_RamRetentionInVLLS == 2)
        SMC->STOPCTRL |= SMC_STOPCTRL_RAM2PO_MASK;
#endif
#if cPWR_POR_DisabledInVLLS0
        if (mode == 0)
        {
            SMC->STOPCTRL |= SMC_STOPCTRL_PORPO_MASK;
        }
#endif /* cPWR_POR_DisabledInVLLS0 */
        (void)(SMC->PMCTRL == 0U);  /* Dummy read of SMC_PMCTRL to ensure the register is written before enterring low power mode */
       
        /* WFI instruction will start entry into deep sleep mode */
        __asm("WFI");
        lowpower_skipped = TRUE;
    }
    return lowpower_skipped;
}
 
the function always go to “ lowpower_skipped = TRUE;”  and the current is still very high. Doesn't like VLLS0/1 mode due to datasheet. Please help
Labels (1)
0 Kudos
1 Solution
466 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hi,

 

If you are interested in using Low Power features with BLE examples, I would recommend checking the "frdmkw36_wireless_examples_bluetooth_temp_sens_freertos". This example

For more information about this example, you could refer to section "Low Power Temperature Sensor and Collector" from the Bluetooth Low Energy Demo Applications User Guide.pdf (SDK\docs\wireless\Bluetooth)

 

Hope this helps.

 

Regards,

Ricardo

View solution in original post

0 Kudos
4 Replies
501 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

Hope you are doing well. Could you please help me checking the "frdmkw36_demo_apps_power_mode_switch" example from the SDK?

 

Best Regards,

Ricardo

0 Kudos
472 Views
darkblue
Contributor I

Hi

I just tried on my board with the project:frdmkw36_demo_apps_power_mode_switch, the current can reach to 1μA .

But when I try to use frdmkw36_wireless_examples_bluetooth_ancs_c_freertos the current reach to 400μA  even though there is only BLE host task and BOARD_BootClockRUN.  I don't initialize any pin.  How can I fix this? I just want to make the current same as frdmkw36_demo_apps_power_mode_switch runs, about 1μA.

0 Kudos
467 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hi,

 

If you are interested in using Low Power features with BLE examples, I would recommend checking the "frdmkw36_wireless_examples_bluetooth_temp_sens_freertos". This example

For more information about this example, you could refer to section "Low Power Temperature Sensor and Collector" from the Bluetooth Low Energy Demo Applications User Guide.pdf (SDK\docs\wireless\Bluetooth)

 

Hope this helps.

 

Regards,

Ricardo

0 Kudos
484 Views
darkblue
Contributor I

Hi, Ricardo

Yes, frdmkw36_demo_apps_power_mode_switch works for me. Before I used PWR libs, seems not working. I will check again in my project. Thx buddy!

0 Kudos