2020-11-20 02:50 AM
Hello,
I work with STM32G070RBT. I upgrade FW to STM32Cube_FW_G0_V1.4.0.
These definitions have disappeared from the file stm32g070xx.h:
#define RCC_CFGR_SWS_HSI (0UL) /*!< HSI used as system clock */
#define RCC_CFGR_SWS_HSE (0x00000008UL) /*!< HSE used as system clock */
#define RCC_CFGR_SWS_PLL (0x00000010UL) /*!< PLL used as system clock */
#define RCC_CFGR_SWS_LSI (0x00000018UL) /*!< LSI used as system clock */
#define RCC_CFGR_SWS_LSE (0x00000020UL) /*!< LSE used as system clock */
My project cannot bild at this time.
Peter
2021-01-27 12:53 PM
Hi Peko,
I was wondering if your issue was resolved?
I have the same error with STM32Cube_FW_G0_V1.4.0 Firmware Package with no previous versions.
2021-04-05 01:16 AM
hello @Imen DAHMEN, @Peko. I'm having a similar problem after updating the software package in my Keil IDe (currently it is 1.4.0.0).
/**
* @brief CMSIS Device version number $VERSION$
*/
#define __STM32G0_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
#define __STM32G0_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
#define __STM32G0_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
#define __STM32G0_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
#define __STM32G0_CMSIS_VERSION ((__STM32G0_CMSIS_VERSION_MAIN << 24)\
|(__STM32G0_CMSIS_VERSION_SUB1 << 16)\
|(__STM32G0_CMSIS_VERSION_SUB2 << 8 )\
|(__STM32G0_CMSIS_VERSION_RC))
Right now, I've added these definitions (state below) directly into the "stm32g0xx.h" file, and I wanted to know whether it's a correct method or not.
/**
* SystemCoreClock variable according to Clock Register Values.
**/
#define RCC_CFGR_SWS_HSI (0UL) /*!< HSI used as system clock */
#define RCC_CFGR_SWS_HSE (0x00000008UL) /*!< HSE used as system clock */
#define RCC_CFGR_SWS_PLL (0x00000010UL) /*!< PLL used as system clock */
#define RCC_CFGR_SWS_LSI (0x00000018UL) /*!< LSI used as system clock */
#define RCC_CFGR_SWS_LSE (0x00000020UL) /*!< LSE used as system clock */
Note* At present, the code is showing no error or warning. It is compiling successfully.
2021-04-18 03:38 AM
Works for me also. THANKS!
2023-07-16 11:30 PM
I encountered the same error when switching from stm32g0-hal-1-3-0 to stm32g0-hal-1-4-0. I looked for the definitions that were missing and generating compilation errors in stm32g0-hal-1-4-0 in the old stm32g0-hal-1-3-0 version. I found that in the file stm32g070xx.h from stm32g0-hal-1-4-0 the following definitions are missing:
#define RCC_CFGR_SWS_HSI (0UL) /*!< HSI used as system clock */
#define RCC_CFGR_SWS_HSE (0x00000008UL) /*!< HSE used as system clock */
#define RCC_CFGR_SWS_PLL (0x00000010UL) /*!< PLL used as system clock */
#define RCC_CFGR_SWS_LSI (0x00000018UL) /*!< LSI used as system clock */
#define RCC_CFGR_SWS_LSE (0x00000020UL) /*!< LSE used as system clock */
I copied the definitions from the stm32g070xx.h file from the STM32Cube_FW_G0_V1.3.0 firmware version into the stm32g070xx.h file from the STM32Cube_FW_G0_V1.4.0 firmware version and I managed to compile the project without errors.