I2C Slave Send not working as expected

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C Slave Send not working as expected

398 Views
DavidLundquist
Contributor I

I've got a project with a KLZ05 and I'm trying to use the PE code manage the I2C interface.  Device is configured in slave mode and I can send data to the micro without any problems.  My difficulty is reading from KLZ05 in slave mode. 

 

I get to a valid CI2C1_OnReadReq event which means the CPU saw the incoming address and the read read bit.  In that event handler routine I call CI2C1_SendChar() provide the send data to the I2C interface in response to the read request.  I never see any valid read data on the master side.  What is interesting is that I do see the last byte written to the KLZ05 as my read data.  I think this means that the host is just reading back the data register of the I2C controller.

 

Is there something i need to do to enable the PE code to feed the TX data to the I2C interface beyond calling the CI2C1_SendChar() routine?    Some good examples would be a big help.

 

Thanks!

Dave

Labels (1)
0 Kudos
2 Replies

115 Views
adriancano
NXP Employee
NXP Employee

Hi,

Have a look at the I2C_LDD component user guide, it might be helpful.


Hope this information can help you

Best Regards,
Adrian Sanchez Cano
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

115 Views
DavidLundquist
Contributor I

Never mind.  The PE code is doing exactly what it should.  Android host is not.

0 Kudos