AnsweredAssumed Answered

fsl i2c master busy

Question asked by Adrian Rockall on May 26, 2015
Latest reply on Jun 3, 2015 by Jorge_Gonzalez

Hi,

 

The KSDK 1.2 fsl_i2c_master_driver created with KDS 3.0 / Pex breaks if a task tries to send or receive while another task is sending or receiving. The check for being idle sets the master->status to kStatus_I2C_Busy if it is busy but that stops the processing of the active task that is looking for kStatus_I2C_Success and from then on every access is busy.

 

I have changed the checks in both send and receive as follows:

    if (!master->i2cIdle)

    {

//        return master->status = kStatus_I2C_Busy;

        return kStatus_I2C_Busy;

    }

 

and then it all seems to work OK. Now the tasks can check for busy and retry without changing the current state and breaking the current process.

 

Have I missed something or does that look to be a reasonable fix?

 

Best regards,

Adrian.

Outcomes