AnsweredAssumed Answered

using SMC_SetPowerModeWait from isr

Question asked by tuomas aaltio on Mar 2, 2017
Latest reply on Mar 3, 2017 by Hui_Ma

what is the correct way to enter low power mode from isr ?I'm using FRDM-KL25Z. My tpm isr doesn't work:

void TPM1_IRQHandler(void)
{
        GPIO_SetPinsOutput( BOARD_DEBU_GPIO, 1u << BOARD_DEBU_GPIO_PIN );
        //SMC_PreEnterWaitModes();
        SMC_SetPowerModeWait(SMC);
        //SMC_PostExitWaitModes();
        GPIO_ClearPinsOutput( BOARD_DEBU_GPIO, 1u << BOARD_DEBU_GPIO_PIN );
    /* Clear interrupt flag.*/
    TPM_ClearStatusFlags(BOARD_TPM_BASEADDR, TPM_CHANNEL_FLAG | kTPM_TimeOverflowFlag);
}

Outcomes