AnsweredAssumed Answered

I2C Locks Up issue on Vybrid

Question asked by Petr Kubiznak on Mar 19, 2015
Latest reply on Apr 22, 2015 by alejandrolozano

On Vybrid, I'm experiencing a lock-up problem, which seems to be related to the one described at Re: MQX 4.0 I2C Locks Up. Even though the thread MQX4.1.1: Is the I2C Locks Up bug fixed? says the issue is fixed for MQX 4.1.1, which I'm using, the problem is still on. Anyway, these threads discuss the Kinetis sources (i2c_pol_ki2c.c, i2c_int_ki2c.c), while Vybrid has their own (i2c_pol_qi2c.c, i2c_int_qi2c.c).


My code sometimes (randomly) locks in a while loop at line 374 of i2c_int_qi2c.c (function _qi2c_int_tx()):

while (0 == (i2c_ptr->I2SR & QI2C_I2SR_IBIF))
{_PSP_SYNC();};   /* wait for address transferred */


Using the polled drivers did not really help, locking e.g. at line 776 of i2c_pol_qi2c.c (function _qi2c_polled_rx_txl()):

    } while (0 == (i2csr & QI2C_I2SR_IBIF));


So my question is - is there a fix of this issue for the Vybrid platform? If not, is there a safe way of recovering from the problem e.g. in a software watchdog task? I mean e.g. resetting the bus without causing any further problems...


Message was edited by: Petr Kubizňák There was an incorrect problematic line stated.