cancel
Showing results for 
Search instead for 
Did you mean: 

Sending data via I2C doesnt work properly

HReet
Associate

Hi,

I want to controll a ST7032 Display Modul via I2C with a STM32G071G8 MCU. Unfortunately I can't manage to send data bytes to the Display. For sending data I use the HAL function HAL_I2C_Master_Transmit() as followed: (for testing)

HAL_I2C_Master_Transmit(&hi2c1, 0x7C<<1, buffer, sizeof(buffer), 1);
HAL_Delay(1000);

where buffer is an array with two uint8_t values.

The code above is looped every second for testing because I cant see data transmitted on the line. The following picture shows what can be seen.

0693W000004GpfxQAC.png

The Display controller seems to ACK the Adress but the MCU stops to send data.

Does anybody knows the mistake?

thanks for your support!

Henning

1 ACCEPTED SOLUTION

Accepted Solutions
HReet
Associate

Solved it!

Missunderstood the datasheets adress information. Shifting the slaves adress is not necessary. So now I'm able to send data.

View solution in original post

2 REPLIES 2

Cube is open-source so you can debug it as your own code.

JW

HReet
Associate

Solved it!

Missunderstood the datasheets adress information. Shifting the slaves adress is not necessary. So now I'm able to send data.