Chapter 3
Interrupts
III - 46 External Interrupts
3.3.3 Both edges triggered Interrupt
Both edges (rising edge and falling edge) interrupt can be specified with the EDGDT.
Setting example of both edges interrupt
The following example shows how to select the both edges triggered IRQ0 at P10.
..
Interrupt edge (rising edge, falling edge or both edges (rising edge and falling edge)) of IRQn
must be changed when IRQnICR.IE is "0". After the interrupt edge is changed, IRQnICR.IR
must be cleared before setting IRQnICR.IE is "1".
..
Step Settings Register Description
1
Set P10 as IRQ0 pin IRQIEN
IRQISEL0
Set IRQIEN.IRQ0EN to "1".
Set IRQISEL0.IRQ0SEL to "0".
* Set P10 as the IRQ0 pin.
2 Select the both edges triggered IRQ0 EDGDT Set EDGDT.EDGDT0 to "1".
3
Set the Interrupt level of IRQ0 IRQ0ICR Set IRQ0ICR.LV1-0 as you like.
* IRQ0ICR.IR should be set to "0".
4 Enable IRQ0 IRQ0ICR Set the IRQ0ICR.IE to "1".