2021-03-26 05:33 AM
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 */
2021-03-26 08:29 AM
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
2021-03-30 03:14 AM
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