cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with I2C Interface on STM32F469I-DISCO

mids400
Associate III

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)

1 ACCEPTED SOLUTION

Accepted Solutions
mids400
Associate III

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.

View solution in original post

3 REPLIES 3
TDK
Guru

> (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".
mids400
Associate III

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.

mids400
Associate III

@TDK > If it works on one board but not another, perhaps those lines are being used by other peripherals on the board.

That is definitiv, thatswhy i have mentioned the board name because its developement board and has a touch panel LCD on the bus.

@TDK > Note that external pullups are required for I2C.

The board has already pull-ups.