cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 V1.4.0 added the macro "#define I2C_TIMEOUT_BUSY_FLAG ": Why was this timeout of 10 seconds added?

PTosh
Associate

For the HAL Library file "stm32f4xx_hal_i2c.c", version V1.4.0, I see the macro "#define I2C_TIMEOUT_BUSY_FLAG " was added.

Why was this timeout of 10 seconds added? Doesn't 10 seconds sound too much for a blocking call on the I2C bus?

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

The patch STM32CubeF4 V1.24.1 is now available on the ST web page.

0690X000008ic6uQAA.jpg

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

6 REPLIES 6

> V1.4.0

The latest released version of STM32F4 HAL is v1.24.1, where I2C_TIMEOUT_BUSY_FLAG is defined as:

#define I2C_TIMEOUT_BUSY_FLAG 25U /*!< Timeout 25 ms */

25 milliseconds, not seconds.

Imen.D
ST Employee

Hello,

You are using an old version of STM32CubeF4 package.

In the latest version STM32Cube_FW_F4_V1.24.1, the macro is defined as follow:

#define I2C_TIMEOUT_BUSY_FLAG   25U     /*!< Timeout 25 ms       */

Pleas update the CubeF4 package to use latest one.

Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
PTosh
Associate

​Thank you for your answers. I am well aware about the latest version and timeout inside, however, I am still seeking information on why the timeout was 10 sec in version 1.4.0. Any help would be appreciated.

Pavel A.
Evangelist III

> The latest released version of STM32F4 HAL is v1.24.1,

Where is it available? the download page still shows 1.24.0

thanks,

- pa

You are right, the patch is not available on the ST web page. I will raise this internally for fix.

You can download the patch STM32CubeF4 v1.24.1 from STM32CubeMx.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hello,

The patch STM32CubeF4 V1.24.1 is now available on the ST web page.

0690X000008ic6uQAA.jpg

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen