STMicroelectronics / STM32CubeF2

STM32Cube MCU Full Package for the STM32F2 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
43 stars 25 forks source link

Bug in HAL_IWDG_DEFAULT_TIMEOUT #4

Closed Kira-sempai closed 1 year ago

Kira-sempai commented 3 years ago

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 commented 3 years ago

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

RKOUSTM commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

ST Internal Reference: 111928

TOUNSTM commented 1 year ago

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,