
III PERIPHERAL BLOCK: SINGLE MASTER I2C-BUS
S1C33T01 FUNCTION PART
EPSON
B-III-9-7
When a NACK is detected, RACKx is cleared to "0". CMSx and DMSx are clock mismatch states, and are set
to "1" when a data mismatch is detected. SPDx and STDx are set to "1" when a corresponding stop or start
condition is detected anywhere other than the stipulated position. When one of the above errors occurs, the EHx
bit in the status register is set to "1" and the bus is set to the free state with the timing shown in Figure 9.6.
An error occurs
NCLKx
SCLx
SDAx
After setting SCLx to the high-impedance state,
wait for one cycle of the noise filter clock (NCLKx)
and then set SDAx to the high-impedance state.
Figure 9.6
Bus Release after an Error Occurs
The error status flag in the error status register is cleared by writing either "000" or "111" to TRNSx[2:0]. It is
also cleared by a software reset (setting I2CSRx to "1"). Note that if an interrupt is issued when an error occurs,
it is necessary to enable the command complete interrupt by setting to "1" both IC_EHx in the interrupt
control/status register in the single-master I
2 C-bus core and the EI2CIx interrupt enable bit in the Ch. 0/1
interrupt enable register in the single-master I
2 C-bus core interrupt controller. (See the "Single-Master I2C-Bus
Interrupts and DMA" item for detailed information on interrupts.)
Clock wait function
The I
2 C-bus can be connected to devices that have a clock wait function by setting CLKWx in the control
register to "1". When the clock wait function is enabled, master transmit operations can be delayed by
lengthening the master clock period while the slave outputs a low level to SCLx.
Ch. 0 clock wait: CLKW0 (D4) / Single-master I
2 C-bus Ch. 0 control register (0x40322)
Ch. 1 clock wait: CLKW1 (D4) / Single-master I
2 C-bus Ch. 1 control register (0x40332)
Single-Master I
2C-Bus Interrupts and DMA
The single-master I
2 C-bus core provides functions in each channel that generate the following interrupts.
Command complete/error interrupt
Read DMA request interrupt
Write DMA request interrupt
Command complete/error interrupt factor
This interrupt factor occurs when interrupts are enabled with either IC_EHx error interrupt flag or the IC_CMPx
command complete interrupt flag (both of which are in the single-master I
2 C-bus interrupt control/status
register) and when either the IS_EHx interrupt error status flag or the IS_CMPx interrupt complete status flag
(in the same register) is set. When either IS_CMPx or IS_EHx is set, the FI2CIx flag in the single-master I
2 C-
bus core Ch. 0/1 interrupt factor flag register will be set. At this time, if the interrupt is enabled by the ingle-
master I
2 C-bus core Ch. 0/1 interrupt enable register, and interrupt request will be issued to the CPU.
This interrupt factor can be used to report the completion of execution of the transfer command and the
occurrence of errors.