Skip to main content
NC??l
Associate
May 13, 2019
Question

Problem with I2C, don't receive ACK

  • May 13, 2019
  • 4 replies
  • 1028 views

Hey guys

I'm using a STM32H743ZIT6 on a Nucleo-144 Dev Board and want to communicate with a BME280 Sensor.

For this I'm using a library recommended by somebody else and when I begin the I2C transmission the chip sends the correct address, however, the TXIS (The Bit that should go high when an ACK is received) never goes high after this, causing the chip to get caught in a wait state. I used a logic analyser to verify the ACK from the sensor is actually send, bus speed is set to 100 kHz.

Has anyone an idea what can cause this problem?

Thanks in advance!

This topic has been closed for replies.

4 replies

GBemb
Visitor II
May 14, 2019

Hi,

Have you made sure that the appropriate AF bits have been set? Typically I2C would not be the primary function of a GPIO pin. Additionally, have you tried using the HAL driver provided by ST to transmit data? If not, try starting with that as a baseline and then move to the other library you mentioned and look for any discrepancies.

Best of luck!

NC??l
NC??lAuthor
Associate
May 14, 2019

Thank you for your help!

I've checked the AF Bits and they are set correctly, also I would say since the correct I2C address is written onto the bus that there isn't any problem with the configuration of the AF - at least none that I noticed.

Maybe any other ideas what might be the issue here?

S.Ma
Principal
May 14, 2019

I'm going to bringup BME280 tomorrow. However using bit bang GPIO I2C as speed is non critical in my application based on STM32L4R5 (not H7).

S.Ma
Principal
May 15, 2019

All working good with BME280 and I2C with GPIO. Used Bosch Git hub reference files.