BAT32G1x9 user manual | Chapter 20 Serial interface IICA
760 / 1149
Rev.1.02
20.5.7
method of release from wait state
In general,
I2C
can be relieved of waiting by the following processing.
• Write data to IICA shift register n (IICAn).
• Set the bit5 (WRELn) of the IICA control register n0 (IICCTLn0) (de-wait).
• Set the bit1 (STTn) of the IICCTLn0 register (generate start condition)
note
.
• Set the bit0 (SPTn) of the IICCTLn0 register (generate stop condition)
note
.
Note: Limited to master devices only.
If these waiting releases are performed,
I2C
dismisses the wait and resumes communication. To send data
(including addresses) after de-waiting, data must be written to the IICAn registers.
To receive data after the wait is lifted or when sending data ends, the bit5 (WRELn) of the IICCTLn0 register
must be placed at "1". To generate a restart condition after a wait is lifted, the bit1 (STTn) of the IICCTLn0 register
must be placed at "1". To generate a stop condition after lifting the wait, the bit0 (SPTn) of the IICCTLn0 register
must be set to "1". Only one release process can be performed for a wait.
For example, if you write data to the IICAn register after de-waiting by placing the WRELn position "1", the
changing timing of the SDAAn line may conflict with the write timing of the IICAn register, resulting in the wrong
value being output to SDAAn line. In addition to these processes, in the case of aborting communication, if the
IICEn bit is cleared "0", the communication is stopped, so the wait can be lifted. In the case where the I2 C-bus
state is deadlocked due to noise, if the bit6 (LRELn) of the IICCTLn0 register is set "1" exits the communication and
therefore can lift the wait.
Note: If you perform a pending release process when the WUPn
bit is
"1", the wait is not dismissed.
Note: n=0,1