Rising (Falling) Edge Triggered Interrupt - Panasonic MN101L Series User Manual

Lsi
Table of Contents

Advertisement

3.3.2

Rising (Falling) edge triggered interrupt

Rising or falling edge interrupt can be selected with IRQ0ICR, IRQ1ICR, IRQ2ICR, IRQ3ICR, IRQ4ICR,
IRQ5ICR and IRQ6ICR.
Setting example of rising edge triggered interrupt
The following example shows how to enable the rising edge triggered IRQ4 at P72.
Step
Settings
Set P72 as IRQ4 pin
1
Select the rising edge triggered
2
IRQ4
Set the Interrupt level of IRQ4
3
4
Enable IRQ4
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".
..
..
Register
IRQIEN
Set IRQIEN.IRQ4EN to "1".
IRQISEL0
Set IRQISEL0.IRQ4SEL to "1".
IRQISEL1
Set IRQISEL1.IRQ4CSEL to "0".
IRQ4ICR
Set IRQ4ICR.REDG to "1".
IRQ4ICR
Set IRQ4ICR.LV1-0 as you like.
* IRQ4ICR.IR should be set to "0".
IRQ4ICR
Set IRQ4ICR.IE to "1".
Description
External Interrupts
Chapter 3
Interrupts
III - 45

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn101lr05dMn101lr04dMn101lr03dMn101lr02d

Table of Contents