20 GENERAL-PURPOSE SERIAL INTERFACE (FSIO)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
20-21
Notes: • When using the IrDA interface, set the internal division ratio of the serial interface to 1/16 (DI-
VMD/FSIO_IRDA
x
register = 0). Do not set it to 1/8 (DIVMD = 1).
• Although Figure 20.8.3.2 shows the input signal as a low pulse of a 3
×
SIO_CLK width, the
RZI circuit recognizes low pulses by means of the signal edge (rising edge when IRRL = 0;
falling edge when IRRL = 1). Note that noise may cause a malfunction.
FSIO Interrupts and DMA
20.9
This section describes the FSIO interrupts and DMA.
For more information on interrupt processing and DMA transfer, see the “Interrupt Controller (ITC)” chapter and
the “DMA Controller (DMAC)” chapter, respectively.
Interrupts
20.9.1
FSIO includes a function for generating the following three different types of interrupts.
• Transmit buffer empty interrupt
• Receive buffer full interrupt
• Receive error interrupt
Each FSIO channel outputs one interrupt signal shared by the three above interrupt causes to the interrupt controller
(ITC). Inspect the interrupt flags and error flags to determine the interrupt cause occurred.
Transmit buffer empty interrupt
To use this interrupt, set TDBE_IE/FSIO_INTE
x
register to 1. If TDBE_IE is set to 0 (default), interrupt re-
quests for this cause will not be sent to the ITC.
When transmit data written to the transmit data buffer is transferred to the shift register, the FSIO module sets
TDBE_IF/FSIO_INTF
x
register to 1, indicating that the transmit data buffer is empty. If transmit buffer empty
interrupts are enabled (TDBE_IE = 1), an interrupt request is sent simultaneously to the ITC. An interrupt oc-
curs if other interrupt conditions are met. You can inspect the TDBE_IF flag in the interrupt handler routine to
determine whether the FSIO interrupt is attributable to a transmit buffer empty. If TDBE_IF is 1, the next trans-
mit data can be written to the transmit data buffer by the interrupt handler routine.
TDBE_IF is cleared by writing 0.
Note: When TDBE_IF is cleared and no data is written to the transmit data buffer, subsequent interrupt
requests will not be issued even if the transmit data buffer is empty.
Receive buffer full interrupt
To use this interrupt, set RDBF_IE/FSIO_INTE
x
register to 1. If RDBF_IE is set to 0 (default), interrupt re-
quests for this cause will not be sent to the ITC.
When the number of data specified with FIFOINT[1:0]/FSIO_IRDA
x
register (one data in standard mode) has
been received in the receive data buffer, the FSIO module sets RDBF_IF/FSIO_INTF
x
register to 1. If receive
buffer full interrupts are enabled (RDBF_IE = 1), an interrupt request is sent simultaneously to the ITC. An
interrupt occurs if other interrupt conditions are met. You can inspect the RDBF_IF flag in the interrupt handler
routine to determine whether the FSIO interrupt is attributable to a receive buffer full. If RDBF_IF is 1, the
received data can be read from the receive data buffer by the interrupt handler routine. However, be sure to
check whether a receive error has occurred or not.
RDBE_IF is cleared by writing 0.
Note: Before RDBF_IF can be cleared by writing 0, be sure to read out the received data from the re-
ceive data buffer.
Receive error interrupt
To use this interrupt, set RERR_IE/FSIO_INTE
x
register to 1. If RERR_IE is set to 0 (default), interrupt re-
quests for this cause will not be sent to the ITC.