Renesas RL78 Series User Manual page 570

16-bit single-chip microcontrollers
Hide thumbs Also See for RL78 Series:
Table of Contents

Advertisement

RL78/G1D
14.5.7 Canceling wait
2
The I
C usually cancels a wait state by the following processing.
● Writing data to the IICA shift register n (IICAn)
● Setting bit 5 (WRELn) of IICA control register n0 (IICCTLn0) (canceling wait)
● Setting bit 1 (STTn) of the IICCTLn0 register (generating start condition)
● Setting bit 0 (SPTn) of the IICCTLn0 register (generating stop condition)
Note Master only
When the above wait canceling processing is executed, the I
To cancel a wait state and transmit data (including addresses), write the data to the IICAn register.
To receive data after canceling a wait state, or to complete data transmission, set bit 5 (WRELn) of the IICCTLn0
register to 1.
To generate a restart condition after canceling a wait state, set bit 1 (STTn) of the IICCTLn0 register to 1.
To generate a stop condition after canceling a wait state, set bit n (SPTn) of the IICCTLn0 register to 1.
Execute the canceling processing only once for one wait state.
If, for example, data is written to the IICAn register after canceling a wait state by setting the WRELn bit to 1, an
incorrect value may be output to SDAAn line because the timing for changing the SDAAn line conflicts with the timing for
writing the IICAn register.
In addition to the above, communication is stopped if the IICEn bit is cleared to 0 when communication has been
aborted, so that the wait state can be canceled.
2
If the I
C bus has deadlocked due to noise, processing is saved from communication by setting bit 6 (LRELn) of the
IICCTLn0 register, so that the wait state can be canceled.
Caution
If a processing to cancel a wait state is executed when WUPn = 1, the wait state will not be canceled.
Remark n = 0
R01UH0515EJ0120 Rev.1.20
Dec 16, 2016
CHAPTER 14 SERIAL INTERFACE IICA
Note
Note
2
C cancels the wait state and communication is resumed.
549

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rl78/g1dR5f11aggR5f11aghR5f11agj

Table of Contents