AnsweredAssumed Answered

LPC1347 understanding low/high-level interrupt

Question asked by Mateusz Kiełbasa on Sep 10, 2017
Latest reply on Sep 18, 2017 by soledad

I am bit confused about low/high level interrupt handling in lpc1347. I think i understand differences between edge and level interrupts. Edge interrupt is fired when pin status changes from 0 to 1 (rising edge) and 1 to 0 (falling edge), thus this is type of event, which occurs when running program, thus I should exprext only one interrupt when voltage changes. Level sensitive interrupt is fired when particular pin is LOW or HIGH for a period of time, thus I should expect permanent interrupts before the status of pin will change. In my lpc1347 I'd like to write a program to examine a situation described above. I configured PINTSEL and PININT registers and I have an interrupt when the pin is HIGH (the built-in LED toggles). But...

 

void PIN_INT0_IRQHandler(void) {
   LPC_PININT->IST = 1;
   j = 0;
   while (j < 1000000) { j++; }
      LPC_GPIO_PORT->NOT[0] = 1 << 7;
}

 

I  get only two interrupts, when the pin goes HIGH and the pin goes LOW (because of the change IENF register by clearing IST register...). My question is can I write program which will interrupt premanently while the pin is HIGH?

Outcomes