Skip to main content
PTosh
Associate
May 15, 2019
Solved

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

  • May 15, 2019
  • 4 replies
  • 1282 views

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?

This topic has been closed for replies.
Best answer by Imen.D

Hello,

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

0690X000008ic6uQAA.jpg

Best Regards,

Imen

4 replies

After Forever
Senior III
May 15, 2019

> 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.

Technical Moderator
May 15, 2019

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
PTosh
PToshAuthor
Associate
May 16, 2019

​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.
Super User
May 20, 2019

> 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

Technical Moderator
May 20, 2019

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.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Imen.DBest answer
Technical Moderator
June 13, 2019

Hello,

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

0690X000008ic6uQAA.jpg

Best Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks