Skip to main content
Graduate
March 26, 2021
Question

There is a bug in stm32l1xx_hal_conf.h. The MSI_VALUE value is wrong.

  • March 26, 2021
  • 2 replies
  • 631 views

DeviceId = STM32L151RETx

FirmwarePackage = STM32Cube FW_L1 V1.10.2

Bug in: stm32l1xx_hal_conf.h

On row 110. The MSI_VALUE is defined as 16000000. It should be defined as 2097152 Hz

/**
 * @brief Internal Multiple Speed oscillator (MSI) default value.
 * This value is the default MSI range value after Reset.
 */
#if !defined (MSI_VALUE)
 #define MSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/
#endif /* MSI_VALUE */

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    March 26, 2021

    Hello @Community member​ ,

    I found different define in the latest firmware package that you may want to check out:

    /**
     * @brief Internal Multiple Speed oscillator (MSI) default value.
     * This value is the default MSI range value after Reset.
     */
    #if !defined (MSI_VALUE)
    #define MSI_VALUE (2097000U) /*!< Value of the Internal oscillator in Hz*/
    #endif /* MSI_VALUE */
     

    Please make sure to use the latest release of STM32CubeL1 V1.10.2, then keep me infomed about your update.

    Imen

    Technical Moderator
    March 30, 2021

    Hi @Community member​ ,

    After check, it seems the error is in the template stm32l1xx_hal_conf.h when using CubeMX tool, which is not aligned with the HAL package.

     #if !defined (MSI_VALUE)
     #define MSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/
    #endif /* MSI_VALUE */
     

    I have passed your feedback along to our CubeMX team for fix.

    Thank you for bringing this issue to our attention.

    Imen