2024-02-19 02:33 AM
Hello,
most devices define helper definitions, like selecting the system clock source. E.g. L412:
#define RCC_CFGR_SWS_MSI (0x00000000UL) /*!< MSI oscillator used as system clock */
#define RCC_CFGR_SWS_HSI (0x00000004UL) /*!< HSI16 oscillator used as system clock */
#define RCC_CFGR_SWS_HSE (0x00000008UL) /*!< HSE oscillator used as system clock */
#define RCC_CFGR_SWS_PLL (0x0000000CUL) /*!< PLL used as system clock */
E.g. The U5 headers miss these definition. What a pity. That makes writing portabe code harder.Please consider adding.
Regards
2024-02-19 07:17 AM
Hello @Uwe Bonnes
In STM32CubeU5, we have the RCC_System_Clock_Source_Status System Clock Source Status on the stm32u5xx_hal_rcc.h:
and RCC_LL_EC_SYS_CLKSOURCE_STATUS System clock switch status on the stm32u5xx_ll_rcc.h:
Best regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-02-19 08:53 AM
Using HAL header does not play well when using/implementing some other "HAL", aka Nut/Os(Ethernut) in my case. Only Vendor provided definitions in the Device header are of help.