Sending data via I2C doesnt work properly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-23 2:54 AM
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.
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
Solved! Go to Solution.
- Labels:
-
I2C
-
STM32G0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-23 3:06 AM
Solved it!
Missunderstood the datasheets adress information. Shifting the slaves adress is not necessary. So now I'm able to send data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-23 3:02 AM
Cube is open-source so you can debug it as your own code.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-23 3:06 AM
Solved it!
Missunderstood the datasheets adress information. Shifting the slaves adress is not necessary. So now I'm able to send data.
