You are here

Hung state on FX2 due to I2C STOP Bit | Cypress Semiconductor

Support & Community

Hung state on FX2 due to I2C STOP Bit

Last Updated: December 31, 2011

Why does the FX2 firmware hangs when the STOP bit is set after polling for the STOP bit.


The following sequence has been found to hang the FX2 8051:

while (I2CS & bmSTOP)
I2CS |= bmSTOP;
while (I2CS & bmSTOP)

The sequence reportedly hangs on the second 'while' loop. To avoid this, perform some other operation - such as getting bus status - prior to resetting the STOP bit. Calls to the EZ-USB FX2 libraries do not have this particular sequence.

The description of the STOP bit in the FX2 Technical Reference Manual (section 13.4..1) is incorrect. A STOP condition can only be generated immediately after the ACK phase of a transfer. If the bus is idle when the STOP bit is set, the STOP bit will remain set (and no STOP condition will be generated) until after the ACK phase of the next transfer.

Knowledge Base Tags: 

Provide feedback on this article

Browse KB By Product

Browse KB by Type