Skip to main content
Renesas Electronics America - Knowledgebase

How can I clear BBSY during master transmit/receive operations of I2C?

Latest Updated:03/19/2008


During master transmit/master receive operations of the I2C bus interface, the bus busy flag (BBSY) will not fall to 0 regardless of bus free state (both SCL and SDA levels are high). Neither writing 0 to BBSY nor issuing the stop condition (writing BBSY = 0 and SCP = 0) will clear the condition. How can I clear BBSY?


The bus busy flag (BBSY) clears to 0 when a stop condition is detected from an actual waveform. You cannot clear BBSY by writing 0 to it directly.
If issuing the stop condition (writing BBSY = 0 and SCP = 0) is not clearing the condition, this may be because this station or another station is fixing SCL or SDA to low level, and the stop condition is not being properly issued as an actual waveform.

If this station is the one that is fixing SCL/SDA to low level, you can use the following procedure to clear BBSY.
1) Write CLR2 = 1 and CLR1 or CLR0 = 1 (IIC internal latch clear of this station).
2) Confirm that SCL/SDA = high (check port input of shared pin).
3) Enter master transmit mode (write MST = 1, TRS = 1)
4) Issue start condition (write BBSY = 1 and SCP = 0).
5) Confirm that start condition issued (confirm that IRIC = 1).
6) Issue stop condition (write BBSY = 0 and SCP = 0).
7) Confirm that stop condition issued (confirm that STOP = 1).
8) Clear the STOP flag (write STOP = 0).

Suitable Products
H8S/2630, 2639, 2638, 2636, 2635
H8S/2472, 2463, 2462
H8S/2268, 2264
H8S/2258, 2239, 2238, 2237, 2227
H8S/2148, 2144
H8S/2138, 2134
H8S/2128, 2124
H8S/2117, 2117R