beautypg.com

1 external interrupt function, External interrupt function – FUJITSU F2MCTM-16LX User Manual

Page 347

background image

331

CHAPTER 17 DTP/EXTERNAL INTERRUPTS

17.4.1

External Interrupt Function

The DTP/external interrupt has an external interrupt function for generating an interrupt
request by detecting the signal (edge or level) in the DTP/external interrupt pin.

External Interrupt Function

When the signal (edge or level) set in the detection level setting register is detected in the DTP/external

interrupt pin, the interrupt request flag bit in the DTP/external interrupt factor register (EIRR1:ER) is set

to "1".

If the interrupt request enable bit in the DTP/external interrupt enable register is enabled (ENIR1:EN =

1) with the interrupt request flag bit set to "1", the interrupt request generation is posted to the interrupt

controller.

If an interrupt request is preferred to other interrupt request by the interrupt controller, the interrupt

request is generated.

If the level of an interrupt request (ICR:IL) is higher than that of the interrupt level mask bit in the

condition code register (CCR:ILM) and the interrupt enable bit is enabled (PS:CCR:I = 1), the CPU

performs interrupt processing after completion of the current instruction execution and branches to

interrupt processing.

At interrupt processing, set the corresponding DTP/external interrupt request flag bit to 0 and clear the

DTP/external interrupt request.

Notes:

When the DTP/external interrupt start factor is generated, the DTP/external interrupt request flag bit
(EIRR1:ER) is set to "1", regardless of the setting of the DTP/external interrupt request enable bit
(ENIR1:EN).

When the interrupt processing is started, clear the DTP/external interrupt request flag bit that caused the
start factor. Control cannot be returned from the interrupt while the DTP/external interrupt request flag
bit is set to "1". When clearing, do not clear any flag bit other than the accepted DTP/external interrupt
factor.