cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 I2C timing not respected

franck23
Senior

Hi,

It seems that in some events the I2C data setup time (Tsu;dat) is not respected by the MCU.

Please let me know if I am wrong.

I am using the I2C1 of an STM32F745 at 100kHz with the HAL library.

The I2C setup was done using the CubeIDE.

When using HAL_I2C_Master_Transmit to send the address followed by 1 byte of data, if an interruption is triggered during the address transmission and is not finished by the end of the transmission, the tx of the data byte is delayed.

Nothing wrong with a delay between address and data.

However, during the delay the SDA line is kept high and then goes down at the same time as the CLK line, not respecting the 250ns Tsu;dat specification.

The issue can be reproduced by adding a delay loop of at least 10us between the address and data transmision in HAL_I2C_Master_Transmit (line 1098 in my case).

The first picture shows the full I2C frame with the delay implemented.

The second picture shows the timing violation happening at the fisrt clock after the delay.0693W000004GvbvQAC.png0693W000004Gvc0QAC.png

0 REPLIES 0