fsl i2c master busy

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

fsl i2c master busy

1,129 次查看
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.

标签 (1)
1 回复

799 次查看
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