cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with I2C, don't receive ACK

NC??l
Associate

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!

4 REPLIES 4
GBemb
Associate

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!

S.Ma
Principal

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).

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

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