cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistancies in U5 device headers

Uwe Bonnes
Principal III

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

 

2 REPLIES 2
STTwo-32
ST Employee

Hello @Uwe Bonnes 

In STM32CubeU5, we have the RCC_System_Clock_Source_Status System Clock Source Status on the stm32u5xx_hal_rcc.h:

STTwo32_0-1708355663457.png

and RCC_LL_EC_SYS_CLKSOURCE_STATUS System clock switch status on the stm32u5xx_ll_rcc.h:

STTwo32_1-1708355784067.png

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.

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.