Senior
April 9, 2021
Question
I2C on STM32G474QE don't works
- April 9, 2021
- 1 reply
- 590 views
The I2C4 on the STM32G474QE (128 pins) don't works .
There is a delay between the clock signals on the I2C bus
The i2C bus was configured for 400Khz.
Has anyone an ide why we have this delays between the clock?
When we execute the same code on a nucleo-G474RE board, the clock signals are OK without any delay.
Is this a bug in the MCU?
Hereby the code i had added in the main()
/* USER CODE BEGIN WHILE */
uint8_t buffer[2] = { 0x02, 0x03 };
while (1) {
HAL_I2C_Mem_Write(&hi2c4,
0xA0,
0x55,
1,
&buffer[0],
2,
5);
HAL_Delay(100);
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}