2024-09-24 12:19 PM
Hello!
I recently designed a custom PCB with an LSM6DS3TR-C IMU. However, it doesn't seem like it responds to I2C and I wonder if anyone could take a quick look at the schematic I have for it to see if I've done a misstake. VCC in the schematic is 3.3V.
Help appreciated :)
Solved! Go to Solution.
2024-09-26 11:04 AM
@victorhook wrote:I am not using external pullups for the SDA/SCL ?
Definitely a Bad Idea - internal pullups are far too weak (too high resistance) for reliable I2C
@victorhook wrote:My guess is that the logic analyzer has stronger pullups or something, thus making it work when it's connected. Does this sound reasonable?
Certainly.
2024-09-24 01:14 PM
Pin 7 is missing, it should be connected to GND. Perhaps it's just hidden. Otherwise, looks good.
See if you can see SDA/SCL on a scope. If you're using STM32/HAL, not that the slave address should be left-shifted one bit.
2024-09-26 10:58 AM - edited 2024-09-26 11:27 AM
Hello, thanks for your response :)
I connected a logic analyzer and it turns out that it indeed works with this analyzer connected, but not without it. I am not using external pullups for the SDA/SCL which I think is the problem. It doesn't seem to be enough with the internal ones in the mcu (STM32C011F6)... My guess is that the logic analyzer has stronger pullups or something, thus making it work when it's connected. Does this sound reasonable?
2024-09-26 11:04 AM
Not really. Logic analyzers should be very high impedance and should not pull one way or another in general, although the cheaper ones will.
I2C needs external pullups of ~2 kOhm or so for normal speeds. If you only have internal pullups, can set the clock speed to 10 kHz or so and it should work.
2024-09-26 11:04 AM
@victorhook wrote:I am not using external pullups for the SDA/SCL ?
Definitely a Bad Idea - internal pullups are far too weak (too high resistance) for reliable I2C
@victorhook wrote:My guess is that the logic analyzer has stronger pullups or something, thus making it work when it's connected. Does this sound reasonable?
Certainly.
2024-09-26 11:30 AM
I tried lowering the clock speed to <10khz but unfortunately it doesn't seem to work neither.
A bit annoying, as the pcb is a badge, and I don't think I can patch it in a hidden fasion... Oh well, let's hope I never forget the pull-ups in the future!
Thanks for your input.