KSDK: I2C slave driver unable to detect stop conidtion

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

KSDK: I2C slave driver unable to detect stop conidtion

754 Views
ashok_gaddam
Contributor I

Hi,


There is an issue exists in KSDK 2.0 I2C slave driver when master sends repeated start I2C slave driver fails to detect the stop condition and also event "kI2C_SlaveCompletionEvent" is generated in the callback function when stop is detected.

 

Stop detection is failing when Random read condition sent by master. See the picture Random Read

 

 

After looking closely in to I2C_SlaveTransferHandleIRQ() function, i found a bug in the code which fails to detect in stop condition.

 

Bug:

handle->isBusy is set to false when NAK is sent by master after reading data from slave. This flag is checked in stop dection before calling callback function. Since this flag is already cleared when NAK is received, it is not calling the callback function with the event 'kI2C_SlaveCompletionEvent'.

 

Work around:

Clear the handle->isBusy only if stop condition is detected. Here is the code snippet with the commented the flag .
 

File: fsl_i2c.c

.

 

Regards,

Ashok

Labels (1)
0 Kudos
Reply
1 Reply

584 Views
miduo
NXP Employee
NXP Employee

Hello,

I had checked our internal JIRA bug processing system, and do not find this issue reported. Anyway, I will double check the issue and let you know the result. Thanks for your information.

0 Kudos
Reply