CarstenOlsen
Newbie level 4
- Joined
- May 5, 2011
- Messages
- 5
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- Copenhagen, Denmark
- Activity points
- 1,344
I have run into a strange I2C-problem on a Cypress 68013A microcontroller - and been stuck there for some weeks
The I2C-bus is connected to several devices - among them an SmBus bridge to a "Smart Battery". The "Smart Battery" regularly transmits control messages and alarm messages to the charger device (LTC4100) and its host. When we read values from the battery, the I2C bus locks up from time to time. Everything else is working perfectly.
The lock up happens under the following conditions:
- The microcontroller (master) is transmitting the first byte (addres) of a write-cycle.
- The master has issued 5 - 8 clock-cycles after the start-condition.
- The CLK is in high-state.
- The SDA is in high-state.
- The battery starts to transmit, pulling SDAn low while CLK is high, causing a start-condition.
When the microcontroller pulls the CLK low again, it keeps the CLK low forever - locking the bus. I have verifyed, that it is the microcontroller who pulls CLK low.
The condition can be seen in the two pictures. The second one is a zoom of the bus-collision. There are small delays between the I2C-bus and the SmBus from the SmBus-bridge. These delays actually reveal who is talking the Cypress on I2C or the Smart Battery on the SmBus.
I have not been able to get the Cypress microcontroller out of this state without cycling power. Even pulling reset low does not bring the I2C back to life.
Any suggestions or experience with this kind of behavior?
Thank you very much.
Kind regards,
Carsten
The I2C-bus is connected to several devices - among them an SmBus bridge to a "Smart Battery". The "Smart Battery" regularly transmits control messages and alarm messages to the charger device (LTC4100) and its host. When we read values from the battery, the I2C bus locks up from time to time. Everything else is working perfectly.
The lock up happens under the following conditions:
- The microcontroller (master) is transmitting the first byte (addres) of a write-cycle.
- The master has issued 5 - 8 clock-cycles after the start-condition.
- The CLK is in high-state.
- The SDA is in high-state.
- The battery starts to transmit, pulling SDAn low while CLK is high, causing a start-condition.
When the microcontroller pulls the CLK low again, it keeps the CLK low forever - locking the bus. I have verifyed, that it is the microcontroller who pulls CLK low.
The condition can be seen in the two pictures. The second one is a zoom of the bus-collision. There are small delays between the I2C-bus and the SmBus from the SmBus-bridge. These delays actually reveal who is talking the Cypress on I2C or the Smart Battery on the SmBus.
I have not been able to get the Cypress microcontroller out of this state without cycling power. Even pulling reset low does not bring the I2C back to life.
Any suggestions or experience with this kind of behavior?
Thank you very much.
Kind regards,
Carsten