STMicroelectronics / STM32CubeF1

STM32Cube MCU Full Package for the STM32F1 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
506 stars 170 forks source link

stm32f1xx_hal_iwdg.c:126:83: error: 'LSI_STARTUP_TIME' undeclared #43

Closed Peck07 closed 2 years ago

Peck07 commented 2 years ago

Caution The Issues are strictly limited for the reporting of problem encountered with the software provided in this project. For any other problem related to the STM32 product, the performance, the hardware characteristics and boards, the tools the environment in general, please post a topic in the ST Community/STM32 MCUs forum.

Describe the set-up

Describe the bug Compilation error: .platformio/packages/framework-stm32cubef1/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_iwdg.c:126:83: error: 'LSI_STARTUP_TIME' undeclared (first use in this function); did you mean 'LSE_STARTUP_TIMEOUT'?

How To Reproduce

  1. HAL_IWDG_MODULE_ENABLED should be defined
  2. As the compilation error says, the problem is in this line: https://github.com/STMicroelectronics/STM32CubeF1/blob/master/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_iwdg.c#L124 LSI_STARTUP_TIME is not defined anywhere.

Additional context the quick fix was to add this line:

define LSI_STARTUP_TIME 85U

but I don't know exactly from where, and why this was missing,athough I could find the missing define under Drivers/CMSIS/Device/ST/STM32F1xx/Include/ headers.

Screenshots

RKOUSTM commented 2 years ago

Hi @Peck07,

Thank you for your report. We tried to reproduce the issue you described, but we couldn't notice the problem. You can refer to this IWDG_Example on STM3210C_EVAL to reload the IWDG counter and to simulate a software fault by generating an MCU IWDG reset when a programmed time period has elapsed. The IDE proposed by ST (IAR, MDK-ARM and SW4STM32) for the IWDG Example all of them are working well.

For any other issue (e.g. related to documentation, to hardware, to ecosystem, to user application, etc.), you shall address your questions to the ST Community. There you shall look for the adequate topic and submit your question or remark.

Please allow me to close this issue now. Thank you for your comprehension and contribution.

With regards,