14-13
Seiko Epson Corporation
S1C31D50 TECHNICAL MANUAL
(Rev. 1.00)
14.6.
Interrupts
SPIA has a function to generate the interrupts shown in Table 14.6.1.
Table 14.6.1 SPIA Interrupt Function
Interrupt
Interrupt flag
Set condition
Clear condition
End of transmission
SPIA_
n
INTF.TENDIF
When the SPIA_
n
INTF.TBEIF bit = 1 after data
of the specified bit length (defined by the SPIA_
n
MOD.CHLN[3:0] bits) has been sent
Writing 1
Receive buffer full
SPIA_
n
INTF.RBFIF
When data of the specified bit length is received
and the received data is transferred from the shift
register to the received data buffer
Reading the SPIA_
n
RXD register
Transmit buffer
empty
SPIA_
n
INTF.TBEIF
When transmit data written to the transmit
data buffer is transferred to the shift register
Writing to the
SPIA_
n
TXD register
Overrun error
SPIA_
n
INTF.OEIF
When the receive data buffer is full (when the re-
ceived data has not been read) at the point that
receiving data to the shift register has completed
Writing 1
SPIA provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent
to the CPU core only when the interrupt flag, of which interrupt has been enabled by the interrupt
enable bit, is set. For
more information on interrupt control, refer to the “Interrupt” chapte
r.
The SPIA_
n
INTF register also contains the BSY bit that indicates the SPIA operating status. Figure 14.6.1
shows the SPIA_
n
INTF.BSY and SPIA_
n
INTF.TENDIF bit set timings.
Figure 14.6.1 SPIA_
n
INTF.BSY and SPIA_
n
INTF.TENDIF Bit Set Timings (when SPIA_
n
MOD.CHLN[3:0] bits = 0x7)
Writing data to the
SPIA_
n
TXD
register
Writing data to the SPIA_
n
TXD register
Master mode
SPICLK
n
SDO
n
SPIA_
n
INTF.BSY
SPIA_
n
INTF.TENDIF
SPIA_
n
MOD register
CPOL bit
CPHA bit
1
1
0
0
#SPISS
n
SPIA_
n
INTF.BSY
SPICLK
n
SDO
n
SPICLK
n
SDO
n
SPIA_
n
INTF.TENDIF
Slavemode
SPIA_
n
MOD register
CPOL bit
CPHA bit
1
1
0
0
1
2
3
7
8
1
2
3
7
8
Содержание S1C31D50
Страница 461: ...25 1 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 25 Package TQFP12 48PIN ...
Страница 462: ...25 2 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP13 64PIN ...
Страница 463: ...25 3 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 TQFP14 80PIN ...
Страница 464: ...25 4 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP15 100PIN ...