fsl i2c master busy

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

fsl i2c master busy

631 Views
adyr
Contributor V

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.

Labels (1)
1 Reply

301 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Adrian Rockall:

I think your fix is valid, thank you for catching this and letting us know. I will report it immediately to KSDK developers.


Regards!,
Jorge Gonzalez