I2C_MasterStart() does not return ack/nack status

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

I2C_MasterStart() does not return ack/nack status

976 Views
Oxolotol
Contributor III

I am sending a start signal to a device which return nack if it is not ready and ack if it is.  I am using the #SDK I2C_MasterStart but it doesn't have a way of returning the ack/nack response from the slave device.  Is there another way to do this?

0 Kudos
Reply
4 Replies

967 Views
Oxolotol
Contributor III

I don't know what happened, but it started sending the correct number of receive bits.  And the device CRC matches.  I got around the 'not being able to get the ack/nack status' by just waiting longer than the maximum device measurement time.  I saw that there was a bit in the master i2c registers that I can possibly read directly. 

0 Kudos
Reply

937 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Oxolotol 

It seems you have solved your problem, you can contact us if still have issue.

 

BR

Alice

0 Kudos
Reply

969 Views
Oxolotol
Contributor III

When I send it with a *write* direction it sends the 9 bits with correct address R/W bit and waits while slave asserts the ack bit (so far so good) .  but when I send the same command to the same address but with a *read* direction it sends 17 bits (address, R/W, ack?,  8 unknown bits).  I doesn't seem to turn the bus around to receive the return ack/nack bit.

 

0 Kudos
Reply

975 Views
Oxolotol
Contributor III

The comments to the routine say that it only sends the Address and R/W bit, but my o-scope is showing it is also running the ack/nack bus cycle (9 bits total)

 

0 Kudos
Reply