Skip to main content
Associate III
November 22, 2023
Solved

Problem with I2C Interface on STM32F469I-DISCO

  • November 22, 2023
  • 3 replies
  • 1924 views

Hello,

I am trying to write something on the I2C bus to a digital potineometer using the STM32F469I-DISCO board but I get no result, even no response from the device and its like there is no device connected on the bus.

I tried the same potineometer on another board without display, STM-Neuclo board, and everything is ok as expected.

The only I2C1 interface is on the Arduino connector of the board and I am using the HAL library with the Master_Trasmit function in blocking mode.

I also tried to block all the connections of the LCD display and the bus was no longer busy, but there was no result either (ITs write nothing)!

 

 

 

 

if (HAL_I2C_IsDeviceReady(&hi2c1, PotiAdr, 2, 100) == HAL_OK)

 

 

 

 

This function always returns HAL_Error, meaning that there is no successful connection with the bus.

I have read the reference manual of the board and there is nothing special to do.

Anyone have an idea about this problem?

Note: I am using TouchGFX and FreeROTS.

Best regards,

Mahdi

 

Edit: I have disabled the internal pull-up resistors of SDA/SCL and now I2C_isDeviceReady returns HAL_OK, that means there is successful connection but still no right signal on Logic Analyser. (i muss receive 29bits but only 27bits on the bus)

This topic has been closed for replies.
Best answer by mids400

Also the HIGH edges of CLK should be 29 (0-28). Now it finally works.

What I did? disabled the internal pull-up resistors (40k) because the board had external pull-ups (1.5k). The data came in and it was displayed correctly on the logic analyser.

3 replies

TDK
November 22, 2023

> (i muss receive 29bits but only 27bits on the bus)

I2C is a byte-based protocol. How are you receiving fractions of a byte?

If it works on one board but not another, perhaps those lines are being used by other peripherals on the board. Note that external pullups are required for I2C.

"If you feel a post has answered your question, please click ""Accept as Solution""."
mids400AuthorBest answer
Associate III
November 22, 2023

Also the HIGH edges of CLK should be 29 (0-28). Now it finally works.

What I did? disabled the internal pull-up resistors (40k) because the board had external pull-ups (1.5k). The data came in and it was displayed correctly on the logic analyser.