cancel
Showing results for 
Search instead for 
Did you mean: 

I2C problem - calling write but no address is sent

Embedded Engineer
Associate II
Posted on June 06, 2017 at 11:20

Hello everyone,

I am using the STM32F429 MCU and the discovery board drivers in order to set up the

I2C1 peripheral on a custom board.

I have modified the driver of the discovery to utilize pins PB6/PB7 (I2C1 instead of I2C3, modifying the clocks and GPIO configuration), apart from that I haven't modified anything! The screenshots shows that the pins must be properly initialized. (Please correct me if I am mistaken.)

After calling I2Cx_Init(), I perform a write operation on the bus: I2Cx_WriteData(uint8_t Addr, uint8_t Reg, uint8_t Value)

If I execute this instruction, I only get multiple Start and Stop operations, however no address is written onto the bus.

Please find attached the transmission using a digital scope.

When I look into the WriteData function, it calls HAL_I2C_Mem_Write, which responds with an I2C_ERROR_AF.

Does anyone have an idea what I am doing wrong?

#mcu #stm32f4 #i2c #stm32f4-discovery
1 REPLY 1
Amel NASRI
ST Employee
Posted on June 09, 2017 at 14:25

Hi

McGinnis.Julian

‌,

Are the I2C pins pulled-up and the required capacitance put in your custom board?

-Amel

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.