AnsweredAssumed Answered

KL17Z - Disabling GPIO interrupt

Question asked by Dhananjay Joshi on Aug 23, 2016
Latest reply on Aug 26, 2016 by EARL GOODRICH

Hello,

 

We are using the KL17Z controller. The external interrupt is configured to interrupt the control on falling edge of the externally applied square wave signal. The interrupt is enabled by setting PORTA_PCR13->IRQC as 1010. There are few patches in the code which require atomic access wherein the external interrupt needs to be disabled and then enabled after executing the code patch.

eg:

func()

{

     disable_port_intr();

      ....

      ....

     enable_port_intr();

}

For doing this we are disabling the interrupt by configuring the PORTA_PCR13->IRQC as 0000. Now the problem here is, when we disable external interrupt as per above procedure it actually skips the interrupt since the controller does not even set the interrupt flag (ISF) on falling edge. As per my requirement, the control should disable the interrupt but still set the interrupt flag on falling edge and jump to the ISR after the interrupt is enabled. How to achieve this in KL17Z controller?

 

Thanks,

 

Dhananjay.

Outcomes