cancel
Showing results for 
Search instead for 
Did you mean: 

I2C device detection issue

smirzaee
Associate

Hello ST Community,

I recently encountered an issue that I have not come across before and am hoping someone can offer some insights.

I have a custom board based on the STM32WB microcontroller, where I am trying to connect an I2C device. The board is able to detect other test I2C devices without any problem. However, it fails to detect a specific target I2C device that I’m using in my application.

To rule out any issues with the I2C device itself or the code, I tested the same I2C device on a Nucleo board with the same code, and it works fine – the device is detected without issue.

What I find puzzling is that the custom board can detect other I2C devices just fine, but not this particular one. I’ve checked the wiring, and everything seems to be set up correctly.

Has anyone experienced something similar or have any suggestions for further troubleshooting? Any comments or hints would be greatly appreciated!

3 REPLIES 3
STTwo-32
ST Employee

Hello @smirzaee 

I'm not an HW expert but let me suggest you check the design of your board and compare it to the Nucleo Design. It should be one of the differences that caused this behavior.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


@smirzaee wrote:

What I find puzzling is that the custom board can detect other I2C devices just fine, but not this particular one


Are you sure that you have the correct Slave Address?

Have you used an oscilloscope to check what's happening on the wires? It's possible that something is marginal, so you get lucky with your "other devices" - which just work - but this one just doesn't.

Also check against the working Nucleo case - compare & contrast?

Did the Nucleo test also include the "other devices"? maybe there's an inherent conflict ... ?

What is the problematic device? Are you sure it's correctly configured; eg, some things support both I2C and SPI, so need a specific setup to select the correct interface ...

 

Karl Yamashita
Lead III

What do you consider as fails to detect?

Do you mean that the slave device does not ACK the master when the master sends the slave address on the I2C bus? Have you looked with an oscilloscope to be sure that the signals look good with minimal slew?

You haven't mentioned what the device is?

Maybe the voltage requirements are not valid or the pull-up resistors are not adequate for this specific device even though other devices do ACK?

Maybe the distance of the slave to the master maybe a factor? In that case, maybe an I2C re-driver could fix the issue?  

 

 

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.