Hi @fglau ,
The I2C speed configuration is based on I2C_TIMINGR register content.
So, in the HAL structure, you need to program properly the parameter hi2c1.Init.Timing:
hi2c1.Init.Timing = I2C_TIMING;
I2C_TIMING value depends on:
- I2C clock source
- the speed you need to set
- rise and fall time
- filter's configuration
The appropriate value may be calculated using STM32CubeMX interface: you will see that a suitable value for TIMINGR will be suggested depending on what you provide as inputs.
-Amel
To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.