STM32CubeF2 icon indicating copy to clipboard operation
STM32CubeF2 copied to clipboard

Bug in HAL_IWDG_DEFAULT_TIMEOUT

Open Kira-sempai opened this issue 4 years ago • 4 comments

https://github.com/STMicroelectronics/STM32CubeF2/blob/cfa4386ba4eaae35dea33e09bac39b87480345ad/Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_iwdg.c#L124

Probably should be #define HAL_IWDG_DEFAULT_TIMEOUT (((6UL * 256UL * 1000UL) / LSI_VALUE) + ((LSI_STARTUP_TIMEOUT / 1000UL) + 1UL))

Kira-sempai avatar Jun 29 '21 11:06 Kira-sempai

BTW, can't find it's definition in stm32f2xx_hal_conf_template.h

Kira-sempai avatar Jun 29 '21 12:06 Kira-sempai

Hi @Kira-sempai,

Thank you for this report. It has been transferred to our development teams. We will be back to you as soon as we get an answer.

With regards,

RKOUSTM avatar Jul 29 '21 13:07 RKOUSTM

Hi @Kira-sempai,

Thank you for your contribution. The point you reported is related to a typo in the comment description. Indeed, a fix in the comment below : https://github.com/STMicroelectronics/STM32CubeF2/blob/cfa4386ba4eaae35dea33e09bac39b87480345ad/Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_iwdg.c#L121-L123 will be updated and made available in future release looks like the following:

  The timeout value is multiplied by 1000 to be converted in milliseconds.
- LSI startup time is also considered here by adding LSI_STARTUP_TIMEOUT
+ LSI startup time is also considered here by adding LSI_STARTUP_TIME
   converted in milliseconds. 

Concerning the define of the LSI_STARTUP_TIME, you can find it in the include files of the CMSIS device.

Thank you once again for your contribution.

With regards,

RKOUSTM avatar Aug 13 '21 15:08 RKOUSTM

ST Internal Reference: 111928

RKOUSTM avatar Aug 13 '21 15:08 RKOUSTM

Hello @Kira-sempai,

The fix has been implemented and is now available in the frame of the latest STM32CubeF2 package V1.9.4 release. This issue can be closed now. Thank you again for your contribution.

With Regards,

TOUNSTM avatar Apr 28 '23 13:04 TOUNSTM