18 UNIVERSAL SERIAL INTERFACE (USI)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
18-23
When the operation that initiated by a software trigger has completed, the USI module sets ISIF/USI_ISIF reg-
ister to 1. If operation completion interrupts are enabled (ISIE = 1), an interrupt request is sent simultaneously
to the ITC. An interrupt occurs if other interrupt conditions are met. You can inspect the ISSTA[2:0]/USI_ISIF
register in the interrupt handler routine to determine the I
2
C operation/status that causes the interrupt.
7.4.1 I
Table 18.
2
C Slave Status Bits
ISSTA[2:0]
Status
0x7
Reserved
0x6
NAK has been received.
0x5
ACK has been received.
0x4
ACK or NAK has been sent.
0x3
End of receive data.
0x2
End of transmit data.
0x1
Stop condition has been detected.
0x0
Start condition has been detected.
(Default: 0x0)
Receive error interrupt
To use this interrupt, set ISEIE/USI_ISIE register to 1. If ISEIE is set to 0 (default), interrupt requests for this
cause will not be sent to the ITC.
An overrun error occurs at the time a transmit or receive trigger is issued after two-byte data has been received
without reading the receive data buffer.
The USI module sets ISEIF/USI_ISIF register to 1 if an overrun error is detected when receiving data. If re-
ceive error interrupts are enabled (ISEIE = 1), an interrupt request is sent simultaneously to the ITC. An inter-
rupt occurs if other interrupt conditions are met. You can inspect the ISEIF flags in the interrupt handler routine
to determine whether the USI (I
2
C slave mode) interrupt was caused by a receive error. If ISEIF is 1, the inter-
rupt handler routine will proceed with error recovery.
To reset an overrun error, clear ISEIF by writing 1, and then read the receive data buffer (USI_RD
register)
twice.
DMA Transfer
18.7.5
The causes of receive buffer full and transmit buffer empty interrupts in UART and SPI master/slave modes can
invoke a DMA. This allows continuous data transmission/reception through DMA transfer between memory and
transmit/receive data buffers. These interrupt signals are output to both the ITC and DMAC. Therefore, DMA trans-
fer can be performed without generating any USI interrupt.
The following lists the DMAC channels that allow selection of a USI interrupt cause as the trigger.
USI receive buffer full:
DMAC Ch.2
USI transmit buffer empty:
DMAC Ch.3
For more information on DMA transfer, see the “DMA Controller (DMAC)” chapter.
Note: The USI module cannot invoke a DMA in I
2
C master and slave mode.
Control Register Details
18.8
8.1 List of USI Registers
Table 18.
Address
Register name
Function
0x300400
USI_GCFG
USI Global Configuration Register
Sets interface and MSB/LSB mode.
0x300401
USI_TD
USI Transmit Data Buffer Register
Transmit data buffer
0x300402
USI_RD
USI Receive Data Buffer Register
Receive data buffer
0x300440
USI_UCFG
USI UART Mode Configuration Register
Sets UART transfer conditions.
0x300441
USI_UIE
USI UART Mode Interrupt Enable Register
Enables interrupts.
0x300442
USI_UIF
USI UART Mode Interrupt Flag Register
Indicates interrupt occurrence status.
0x300450
USI_SCFG
USI SPI Master/Slave Mode Configuration Register
Sets SPI transfer conditions.
0x300451
USI_SIE
USI SPI Master/Slave Mode Interrupt Enable Register
Enables interrupts.
0x300452
USI_SIF
USI SPI Master/Slave Mode Interrupt Flag Register
Indicates interrupt occurrence status.
0x300460
USI_IMTG
USI I
2
C Master Mode Trigger Register
Starts I
2
C master operations.
0x300461
USI_IMIE
USI I
2
C Master Mode Interrupt Enable Register
Enables interrupts.
0x300462
USI_IMIF
USI I
2
C Master Mode Interrupt Flag Register
Indicates interrupt occurrence status.