AnsweredAssumed Answered

LPC1347 Level Interrupts, lpcware, MCUXpresso

Question asked by Ron Kreymborg on Nov 28, 2019
Latest reply on Nov 28, 2019 by jeremyzhou

I need interrupts from both edges of a 0 to 3.3V triangular input wave. It must interrupt on the rising edge and then on the falling edge. The actual interrupt levels are not important, just so both edges are caught. The frequency is low enough that using EDGE triggering I get six or so interrupts at the chip's trigger levels on both edges.

I had thought the solution would be to use LEVEL triggering implemented so that at the first rising edge interrupt the rising interrupts are turned off and falling interrupts turned on. On the subsequent falling interrupt, falling interrupts are turned off and rising interrupts turned on. This would give me a single interrupt on both edges.

However, while I have tried various combinations of the associated  pinint_13xx functions, I cannot arrive at a sequence that would look something like:

 

void PIN_INT1_IRQHandler(void) {

   // Interrupt setting is LEVEL.

   if (this Interrupt was high-going) {

      Disable high-going interrupts;

      Enable low-going interrupts;

   }

   else {

      Enable high-going interrupts;

      Disable low-going interrupts;

   }

 

My problem is there does not seem to be equivalent functions in the pinit_13xx library and I am not sure I understand how to implement the above functions myself. Has anyone managed to implement level interrupt code with this functionality?

 

Many thanks,
Ron Kreymborg

Outcomes