I2C receive error

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

I2C receive error

410 Views
huyle03
Contributor I

Hello everyone,

I have an error with I2C on S32K344 EVB board.  I don't know if the configuration and the code are wrong or missing something. The first frame address + 1 bit write is OK (ACK received). The next frame I sent is the data 0x00, I also got ACK from slave. However, the third frame is reading from slave but the API function return status "LPI2C_IP_BUSY_STATUS". Here are some captures of the problem . Thanks for your help.

 

0 Kudos
Reply
1 Reply

368 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you are checking wrong return status of Send function. Non-blocking Send returns LPI2C_IP_SUCCESS_STATUS, if transfer was started properly. In your case it does not go to do-while loop to test transfer status. So try  
 
PetrS_0-1761044916821.png

BR, Petr

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2189037%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EI2C%20receive%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2189037%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20everyone%2C%3C%2FP%3E%3CP%3EI%20have%20an%20error%20with%20I2C%20on%20S32K344%20EVB%20board.%20%3CSPAN%3E%26nbsp%3BI%20don't%20know%20if%20the%20configuration%20and%20the%20code%20are%20wrong%20or%20missing%20something.%20The%20first%20frame%20address%20%2B%201%20bit%20write%20is%20OK%20(ACK%20received).%20The%20next%20frame%20I%20sent%20is%20the%20data%200x00%2C%20I%20also%20got%20ACK%20from%20slave.%20However%2C%20the%20third%20frame%20is%20reading%20from%20slave%20but%20the%20API%20function%20return%20status%20%22LPI2C_IP_BUSY_STATUS%22.%20Here%20are%20some%20captures%20of%20the%20problem%20.%20Thanks%20for%20your%20help.%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2189919%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20I2C%20receive%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2189919%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CDIV%3Eyou%20are%20checking%20wrong%20return%20status%20of%20Send%20function.%20Non-blocking%20Send%20returns%20LPI2C_IP_SUCCESS_STATUS%2C%20if%20transfer%20was%20started%20properly.%20In%20your%20case%20it%20does%20not%20go%20to%20do-while%20loop%20to%20test%20transfer%20status.%20So%20try%20%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PetrS_0-1761044916821.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22PetrS_0-1761044916821.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F361849iFF3079839A05E6EA%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22PetrS_0-1761044916821.png%22%20alt%3D%22PetrS_0-1761044916821.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3EBR%2C%20Petr%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E