/* Shut off the Flash and execute the _WFI(), then power up the Flash after wake-up event.  */
static void POWER_PowerCycleCpu(void)
/* Shut off the Flash and execute the _WFI(), then power up the Flash after wake-up event.  */
static void POWER_PowerCycleCpu(void)
{
    POWER_SetSystemClock12MHZ();
    SCB->SCR = SCB->SCR | SCB_SCR_SLEEPDEEP_Msk;
    __WFI();
    SCB->SCR = SCB->SCR & (~SCB_SCR_SLEEPDEEP_Msk);
}