AnsweredAssumed Answered

GPIO interrupt happens twice per one event

Question asked by Takashima on Aug 14, 2016
Latest reply on Sep 13, 2016 by rasto

I'm writing the GPIO interrupt handler for K60_100 using KSDK 1.3.0.

I also refer gpio_example project in the \KSDK_1.3.0\examples\twrk60d100m\driver_examples\gpio\iar.

To reduce execution time of GPIO interrupt handler, I modified the BOARD_SW_IRQ_HANDLER() as below.

void BOARD_SW_IRQ_HANDLER(void)

{

    isButtonPress = true;

    // Toggle LED1.

    GPIOA_PTOR = (1 << 11);

    PORTA_ISFR = PORTA_ISFR;

}

 

After that GPIO interrupt occur twice even if press switch one time.

Before modification, GPIO interrupt occur once.

In addition, after add dummy() routine as below, GPIO interrupt occur once.

void dummy(void)

{

}

void BOARD_SW_IRQ_HANDLER(void)

{

    dummy();

    isButtonPress = true;

    // Toggle LED1.

    GPIOA_PTOR = (1 << 11);

    PORTA_ISFR = PORTA_ISFR;

}

 

Please advise to fix this issue as soon as possible.

 

Best regards,

Takashima

Outcomes