lpcware

Can M0+ set theMCU to go in deep sleep or power down states?

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by filartrix on Tue Jul 14 07:23:11 MST 2015
Hi all,
thank to you I undestrood that low power modes, different from "POWER_SLEEP" in function:
void Chip_POWER_EnterPowerMode(POWER_MODE_T mode, uint32_t peripheral_ctrl);

affect both cores (i.e. If I use Power Down for M4, also M0+ will be in power down mode)

I made some tests to manage power policy from M0+, it seems that the M4 can put the MCU only in sleep mode (WFI). If I call from M0+ the following function:
    
/* M0+ code */
/* Set voltage as low as possible */
        Chip_POWER_SetVoltage(POWER_LOW_POWER_MODE, Chip_Clock_GetMainClockRate());
        /* Now enter sleep / power down state */
        Chip_POWER_EnterPowerMode(POWER_DEEP_SLEEP, (SYSCON_PDRUNCFG_PD_WDT_OSC | SYSCON_PDRUNCFG_PD_SRAM0A | SYSCON_PDRUNCFG_PD_SRAM0B));

the board consume exactly the same power asif I call the function:
    
/* M0+ code */
/* Set voltage as low as possible */
        Chip_POWER_SetVoltage(POWER_LOW_POWER_MODE, Chip_Clock_GetMainClockRate());
        /* Now enter sleep / power down state */
        Chip_POWER_EnterPowerMode(POWER_SLEEP, (SYSCON_PDRUNCFG_PD_WDT_OSC | SYSCON_PDRUNCFG_PD_SRAM0A | SYSCON_PDRUNCFG_PD_SRAM0B));


is there anyway I could control power state from M0?
Thank you
Filippo

Outcomes