2023-07-30 09:00 PM - edited 2023-07-30 09:56 PM
Hello forum,
I am facing an issue related to i2c communication.
Controller: STM32G0 series
I2C mode: slave mode
I have configured the controller as I2C slave mode with a single master.
When I am configuring the i2c frequency 100khz, both (master and slave) devices working fine.
But when I am setting the frequency 400khz, HAL_I2C_ERROR_ARLO error flag is set in MCU.
Does anyone have any idea why this is happening?
Note: I am using only single master for communication.
2023-07-31 03:32 AM
Hello @Dthum.1 ,
I couldn't reproduce this issue !
Please share more details about your setup.
Foued
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-07-31 03:41 AM
Hello @Dthum.1
First let me thank you for posting.
Based on the reference manual RM0454. The frequency which you used at the first time (100 khz) refers to the STANDARD MODE for slower communications.
And the second frequency 400 KHz refers to FAST MODE. Depending on the STM32 model and the I2C peripheral used, you can have more options like FAST MODE PLUS (1 MHz).
When using higher speed modes, you need to be sure that all devices on the I2C bus support and are compatible with the chosen speed.
You should also consider other factors such as pull-up resistors and capacitance on the I2C bus which can affect the communication reliability.
Thx
Mahmoud BEN ROMDHANE