Skip to main content
Uwe Bonnes
Chief
February 19, 2024
Question

Inconsistancies in U5 device headers

  • February 19, 2024
  • 1 reply
  • 876 views

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

 

This topic has been closed for replies.

1 reply

STTwo-32
Technical Moderator
February 19, 2024

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

Uwe Bonnes
Chief
February 19, 2024

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.