This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Could I2C stuck after being interrupted?

Hi,

We are using both I2C0 and I2C1 of OMAP L138. Many of the I2C peripheral access are done without using interrupt in the sense that we poll ICRRDY (for read) or ICXRDY (for write) to see if an I2C access or part (like sending the address or sending/receiving one of the data bytes) of an I2C access has completed.

If an I2C access is interrupted by an interrupt from other modules, is it possible for the I2C to permanently stuck?

We so far haven’t experienced this. Also we found that when timeout error occurs the I2C driver routine forces a re-initialization upon the current I2C (0 or 1) module. For read it looks like

         do

         {

            if (cnt++ > I2C_TIMEOUT)

            {

               // timed out waiting for data...reinit and return error.

               I2C_init(i2c, g_clock_rate);

               return (ERR_TIMEOUT);

            }

         } while (!CHKBIT(i2c->ICSTR, ICRRDY));

 

and for write it is also the same.

So is it already enough to guarantee that we will not got stuck in I2C after it has been interrupted at any time?

 

Paul