I2C Arbitration Lost errors

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

I2C Arbitration Lost errors

4,211 Views
mspenard603
Contributor IV

Hi All,

 I have my RT1062 setup to be a I2C master. I send out a Read command as seen below, and very often but not always, my master's ISR kicks out an Arbitration Lost error (kStatus_LPI2C_AribitrationLost). Right after it sends the Read Bit, and control is to be handed off to the slave to put the Read Data on SDA. 

Any insight as to what is going on here? Do I have a pin config issue? Or is there a timing issue in the driver in handing things off?

BAD ACK screen.bmp

0 Kudos
5 Replies

3,470 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I would recommend customer to refer MCUXpresso SDK for MIMXRT1060-EVK board  I2C demo.

The demo located with below path:

..\SDK_2.5.0_EVK-MIMXRT1060\boards\evkmimxrt1060\driver_examples\lpi2c

And please check below I2C circuit, please add external pull up resistors with I2C_SDA, I2C_SCL pins:

pastedImage_1.png


Have a great day,
Mike

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

3,470 Views
mspenard603
Contributor IV

Traced it down to a timing issue... Despite both master (RT1602) and slave (Cypress PSOC3) being set for 100kbps the slave needed to be overclocked slightly.

The slaves duty cycle between SDA bits must of been, from time to time, just longer than the masters clock pulse width. Putting master into an Arbitration Lost condition and letting go of SCL altogether.

Interesting that it was doing this only on the first byte of a Read command. PSOC I2C code handles that byte different of course, so it can unpack the address.That extra bit of work must of put the SDA pulse cycle just under 100khz from time to time.

0 Kudos

3,470 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I check Cypress PSOC3 datasheet with below description:

pastedImage_1.png

And it suggested to use 4.7Kohm pull up with I2C Normal mode:

pastedImage_2.png

Please check if the hardware circuit change could make the I2C read working.

best regards,

Mike

0 Kudos

3,470 Views
mspenard603
Contributor IV

I was running 4.7k earlier. Then tried 2.7k. Still had the Arbitration Loss issue after Read-command. Only solution was to over-clock the PSOC3 slave end. It's at an effective rate of 125kbps.

0 Kudos

3,471 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Thanks for the info.

best regards,

Mike

0 Kudos