BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
728 / 1149
Rev.1.02
19.9.6
In simple I2C (IIC00, IIC01, IIC10, IIC11, IIC20, IIC21, IIC30, IIC31)
Processing steps
when an error occurs during
communication
In simple I2C (IIC00, IIC01, IIC10, IIC11, IIC20, The processing steps for errors that occur during IIC21,
IIC 3 0, IIC31) are Figure 19-129and Figure 19-130shown.
Figure 19-129 Processing steps when an overflow error occurs
Figure 19-130 Processing steps when an ACK error occurs in simple I2C mode
Remark m: unit number(m=0~2)n:channel number(n=0~3)r:IIC number(r=00, 01, 10, 11, 20, 21, 30, 31)
mn=00
~
03, 10
~
11, 20
~
21
Software operation
Hardware status
remark
The BFFmn bit of the SSR mn register is "0"
and channel n is in a receivable state.
This is to prevent overflow errors from
occurring at the end of the next receive during
mishandling.
Read the serial status register mn (SSRmn).
The type of class that is judged incorrectly,
and the read value is used to clear the error
flag.
Clears the error flag.
By writing the read value of the SSRmn register
directly to the SDIRmn register, only errors
during the read operation can be cleared.
Read the serial data register mn (SDRmn).
Clear the trigger register mn to the
serial flag
(SDIRmn)
写
"1"
。
Software operation
Hardware status
remark
Read the serial status register mn
(SSRmn).
The error class is judged, and the
reading
value is used to
remove
the error flag.
Clears the error flag.
By writing the read value of the SSRmn
register
directly to the
SDIRmn
register,
only errors
during the read operation can be cleared.
The serial channel allows the SEm n bit of the
status register m(SEm) to be "0" and the
channel n Is the run stopped state.
Because ACK is not returned, the slave device
is not prepared for reception. As a result, a stop
condition is generated and the bus is released,
and the communication is started again from
the start condition, or a restart can also be
generated Conditions and re-proceeds starting
from the address sending.
Cease to be
generated
.
Generate start conditions.
Place the serial channel starting register
m(SSm).
SSmn position
"1".
The serial channel allows the SEm
n
bit of the
status register
m(SEm)
to be
"1"
and channel
n
to be operational.
Write the serial flag to clear the
trigger register mn
(SDIRmn)
。
Stop the serial channel register m(STm).
STmn position
"1".