STMicroelectronics / STM32CubeF7

STM32Cube MCU Full Package for the STM32F7 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
331 stars 193 forks source link

Wrong description about HAL_IWDG_DEFAULT_TIMEOUT #97

Closed almightychang closed 1 year ago

almightychang commented 1 year ago

The comment about HAL_IWDG_DEFAULT_TIMEOUT seems to be outdated: https://github.com/STMicroelectronics/STM32CubeF7/blob/fe78bad77db8206ff7b65e6d0d07fca912756404/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_iwdg.c#L120-L129

The comments suggests to multiply by 1000 to convert into milliseconds. However, it is already multiplied by 1000U. HAL code assumes it as milliseconds just as below:

https://github.com/STMicroelectronics/STM32CubeF7/blob/fe78bad77db8206ff7b65e6d0d07fca912756404/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_iwdg.c#L203

RJMSTM commented 1 year ago

Hello @almightychang,

Thank you for this report. We will get back to you as soon as we analyze it further. This may take some time. Thank you for your comprehension.

With regards,

ALABSTM commented 1 year ago

Hi @almightychang,

Looks like there is a slight misunderstanding. The descriptive comment says that the timeout value has already been multiplied by 1000 to be in milliseconds. No need to multiply it again at the user application level.

https://github.com/STMicroelectronics/STM32CubeF7/blob/fe78bad77db8206ff7b65e6d0d07fca912756404/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_iwdg.c#L126

I hope this removes the ambiguity. Please let me know whether this answers your question.

With regards,

ALABSTM commented 1 year ago

Hi @almightychang,

I hope my previous comment helped clarify the point. Please allow me to close this thread. Thank you again for your post.

With regards,