Odd I2C issue, could use some sugestions

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using ASF and a SAM4S. I have an I2C bus setup as shown in the block diagram below. I'm using PCA9615's as a differential bridge board to board, a PCA9547 (or PCA9548) as a bus fan-out, and the end device is a slew of APDS9130 proximity sensors. In this configuration, I can talk to the PCA9547 fan-out just fine, I can get a clean signal directly to the APDS9130 sensor with the correct address, but the APDS9130 will not ACK. 

 

If I remove the fan-out from the equation, still no ACK from the APDS9130. If I remove the PCA9615 bridge and connect the APDS9130 directly to the SAM4S, I get a valid ACK and it works. 

 

Now for the ~really~ interesting part. If I run the original setup (block diagram below) with an Arduino Mega2560 instead of the SAM4S, everything works fine. I get an ACK from both the PCA947 and the APDS9130 over the PCA9615 bridge. 

 

I'm really pulling my hair out on this one. Pull-ups on every portion of the bus needed, all tuned to have waveforms that appear to meet every slope and timing spec for every part. I know I must be missing something, but darned if I can find it. 

 

Anyone seen similar in the past? Ideas on things to check?

 

Appreciate any and all ideas.

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is this SW or HW i2c ?

One detail to check is to zoom into the SCL edges, with the scope on the most-remote nodes, and check SCL is fully low before SDA changes.

If you have skews and any remote sees SDA change when it thinks SCL is hi, you have a stop/start triggered.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:

Is this SW or HW i2c ?

One detail to check is to zoom into the SCL edges, with the scope on the most-remote nodes, and check SCL is fully low before SDA changes.

If you have skews and any remote sees SDA change when it thinks SCL is hi, you have a stop/start triggered.

 

 

This is using the SAM4S TWI and I2C.h (I guess that qualifies as hardware...)

 

This is an are that I'm focusing on now, but to no great discovery. The PCA9615 bridge keeps the ground floor of the bus at ~400mV until pulled down by another device, but that seems to be in line with spec on all devices. Bit changes seem on point.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AVR is doing I2C OK, but not the SAM4S.    Are you using a third-party library for the SAM4S I2C, or did you write your own code?  ARM processors have several obscure clocking signals that are not found on the AVR, and they all have to be configured correctly.  A third-party library will set these up for you, but they might get overlooked by DIY code.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 What is your I2C bus speed?

what happens if you slow speed to 1/2?
 

jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...