External Interrupt3 of LPC1769
-
- Posts: 16
- Joined: Tue Jul 21, 2015 6:49 am
External Interrupt3 of LPC1769
Hi,
i developed an application using lpc1769 which should perform as:
1) When detects rising edge interrupt on P2.11, Its ISR is executed.
ISR includes :
1) Disable this interrupt.
2) if GPIO pin(P2.0) was at low making it high(vice-versa) for 80ms and re-enabling the interrupt. so steps 1 to 2 continue.
so my output is for every rising edge of input pulse at P2.11, there is pulse on P2.0 having positive and negative period equal to 80ms. find the attached waveforms. But I am getting the output as, after 80ms once i re-enable the interrupt, irrespective of edge Interrupt is served immediately. I am not understanding this behaviour of interrupt.
Please reply
Thanks and Regards
Anita
i developed an application using lpc1769 which should perform as:
1) When detects rising edge interrupt on P2.11, Its ISR is executed.
ISR includes :
1) Disable this interrupt.
2) if GPIO pin(P2.0) was at low making it high(vice-versa) for 80ms and re-enabling the interrupt. so steps 1 to 2 continue.
so my output is for every rising edge of input pulse at P2.11, there is pulse on P2.0 having positive and negative period equal to 80ms. find the attached waveforms. But I am getting the output as, after 80ms once i re-enable the interrupt, irrespective of edge Interrupt is served immediately. I am not understanding this behaviour of interrupt.
Please reply
Thanks and Regards
Anita
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 545
- Joined: Fri Dec 31, 2010 12:30 pm
- Contact:
Re: External Interrupt3 of LPC1769
Make sure you clear the interrupt before returning from the interrupt handler. Refer to the NXP LPC176x/5x User manual (UM10360) for more information.
-
- Posts: 16
- Joined: Tue Jul 21, 2015 6:49 am
Re: External Interrupt3 of LPC1769
Hi,
Thank you for reply. Yes I have cleared the interrupt in ISR of external interrupt. There are two methods to clear : 1) Making the interrupt pin itself not to receive the interrupt i.e by putting the zero in the bit of register GPIO Interrupt Enable for port 2 Rising Edge.(IO2IntEnr) 2) Disabling the interrupt in the NVIC itself. I tried with both methods, but still behaviour remains same.
Thank you for reply. Yes I have cleared the interrupt in ISR of external interrupt. There are two methods to clear : 1) Making the interrupt pin itself not to receive the interrupt i.e by putting the zero in the bit of register GPIO Interrupt Enable for port 2 Rising Edge.(IO2IntEnr) 2) Disabling the interrupt in the NVIC itself. I tried with both methods, but still behaviour remains same.
-
- Site Admin
- Posts: 545
- Joined: Fri Dec 31, 2010 12:30 pm
- Contact:
Re: External Interrupt3 of LPC1769
I thought that to clear the interrupt you had to set Bit 11 in the IO2IntClr register (Section 9.5.6.11)?
-
- Posts: 16
- Joined: Tue Jul 21, 2015 6:49 am
Re: External Interrupt3 of LPC1769
Yes, first I cleared the bit in the IO2IntClr, (which will clear interrupt status).
-
- Site Admin
- Posts: 545
- Joined: Fri Dec 31, 2010 12:30 pm
- Contact:
Re: External Interrupt3 of LPC1769
You need to set the bit in the Clear register to clear the interrupt.