Skip to main content
Visitor II
September 14, 2017
Question

Error ''''LSE_STARTUP_TIMEOUT'' is undefined''

  • September 14, 2017
  • 3 replies
  • 2125 views
Posted on September 14, 2017 at 06:05

Hi,

I got the following error when I try to run an example of RTX_Blinky from Tutorial: Cortex-M7 STM32 F7 Discovery Kit.

The example software zip file is from www.keil.com/appnotes/docs/apnt_280.asp.

C:\Keil_v5\ARM\PACK\Keil\STM32F7xx_DFP\2.9.0\Drivers\STM32F7xx_HAL_Driver\Src\stm32f7xx_hal_rcc.c(481): error: &sharp20: identifier 'LSE_STARTUP_TIMEOUT' is undefined.

Please advise me how to solve the problem.

https://community.st.com/tags♯/?tags=stm32f746g-disco

‌

Thanks.

Regards,

Thiha Kyaw

#stm32f746g-disco
    This topic has been closed for replies.

    3 replies

    Technical Moderator
    September 14, 2017
    Posted on September 14, 2017 at 19:17

    Hello,

    You need to review the defines passed by the compile.

    Make sure that your project includes the right files and defines symbols. You can use the pre-processor's facilities.

    Kind Regards

    Imen

    Visitor II
    October 15, 2017
    Posted on October 15, 2017 at 14:20

     ,

     ,

    Hi Imen D, actually Keil or STM have to review the defines - THIHA KYAW explicitly says he is using an 'example project'!

    Here is what page 74 of , the UM 1905 'Description of STM32F7xx HAL drivers' says ,

    'LSE_STARTUP_TIMEOUT Timeout for LSE start up, expressed in ms 5000'

    so it looks like ,

    a mismatch of the ST HAL versions. It should be in ,

    http://www.tjaekel.com/eth/doxygen/stm32f7xx__hal__conf_8h_source.html

    :

    ♯ define LSE_STARTUP_TIMEOUT , , ,((uint32_t)5000U)

    .

    Visitor II
    October 15, 2017
    Posted on October 15, 2017 at 22:00

    given that you found it where it should be, in the HAL driver, it would seem that the original poster's problem is in their own local installation rather than ST's example.

    Visitor II
    October 19, 2017
    Posted on October 19, 2017 at 08:33

    Actually it is due to DFP version. If I use older version, I don't have any issue. But it doesn't work with latest DFP version.

    Technical Moderator
    October 19, 2017
    Posted on October 19, 2017 at 16:33

    Hello,

    After check, the LSE_STARTUP_TIMEOUT should be defined in your stm32f7xx_hal_conf.h

    This definition is already included in our STM32CubeF7 package, in the 

    stm32f7xx_hal_conf_template.h

    and the Cube examples worked properly without this error.

    So, this error comes from Keil and you 

    can report it to Keil support, they will take care to fix this issue.

    Kind Regards

    Imen

    Visitor II
    January 14, 2025

    Actually, STM32CubeMX generates a hal_conf.h with `LSE_STARTUP_TIMEOUT` and a hal_iwdg.c using 'LSI_STARTUP_TIME', leading to an error in a freshly generated project that says 

     

    Src/stm32l4xx_hal_iwdg.c:130:44: error: 'LSI_STARTUP_TIME' undeclared (first use in this function); did you mean 'LSE_STARTUP_TIMEOUT'?

     

    I realize post is for F7, but this issue is still present elsewhere and not acknowledged by ST.