Skip to main content
Renesas Singapore - Knowledgebase

How to clear the BBSY?

Latest Updated:03/19/2008


During master transmit/master receive operations of I2C bus interface 2, 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 IICRST = 1 (release SCL/SDA output latch of this station).
2) Write IICRST = 0 (release internal reset).
3) Confirm that SCL/SDA = high (check port input of shared pin).
4) Enter master transmit mode (write MST = 1, TRS = 1)
5) Issue start condition (write BBSY = 1 and SCP = 0).
6) Confirm that start condition issued (confirm that SCLO = 0).
7) Issue stop condition (write BBSY = 0 and SCP = 0).
8) Confirm that stop condition issued (confirm that STOP = 1).
9) Clear the STOP flag (write STOP = 0).

Suitable Products
H8S/2556, 2552, 2506
H8S/2378, 2378R
H8SX/1668R, H8SX/1668M
H8SX/1658R, H8SX/1658M
H8SX/1648G, H8SX/1648H
H8SX/1648A, H8SX/1648L
H8SX/1638, H8SX/1638L