cancel
Showing results for 
Search instead for 
Did you mean: 

I2C communication address issue

Forest.Xu
Associate II

Hi, All.

I have come across an odd situation in I2C communication between F405 and sensors

1) F405 is master. address is 7 Bit

2) with 3 slave I2C sensors , address, 22h,35h,78h

3) There is no issue to read data from sensors of 22h and 35h

but when communicate with 78h. after sending address 78h. another byte F0h is sent

The F0h is not expected.

any thoughts.

Thanks

Forest


_legacyfs_online_stmicro_images_0693W00000bkmxQQAQ.png
_legacyfs_online_stmicro_images_0693W00000bkmxaQAA.png 

3 REPLIES 3
Bob S
Principal

Show your code (pasting code here using the button below that looks like "</>")

The extra 0xf0 looks like the FIRST byte of a 10-bit address, but obviously not appearing as the first byte. May just be a coincidence.

Foued_KH
ST Employee

Hello @Forest.Xu​ ,

Could you please share more details ( Code, sensor name, ...)

Foued

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.

Forest.Xu
Associate II

Hi,@Bob S​ ,@KHALSI_Foued​ :

Thank you for your help. sorry for my late reply. actually it is my colleague's project.

I just initiated the conversation in the ST community to see if anyone has similar issue and answer

more information from my colleague

1) it used to work well in F3. but it does not work anymore in F4.

2) the sensor is https://www.ti.com/lit/ds/symlink/tmag5273.pdf

The reason is probably that it will be 0xF0 after shifting 0x78 +0 (write). The 0xF0 may cause confusing between 7bit and 10 bit address.

I will ask my colleague to continue this conversation. she may have the code and more information.