using SMC_SetPowerModeWait from isr

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

using SMC_SetPowerModeWait from isr

883件の閲覧回数
tuomasaaltio
Contributor II

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);
}

ラベル(1)
0 件の賞賛
返信
1 返信

746件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

I don't recommend enter into lower power mode in interrupt service routine.

It could set a flag in interrupt service routine and after exit the interrupt service routine check the flag to determine if enter into lower power mode or not.


Wish it helps.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信