2025-07-07 12:34 AM
Get early access to the next-generation STM32Cube HAL drivers for STM32U5
A major update to STM32Cube HAL drivers, called HAL2, is now available for preview on GitHub. It supports the STM32U5 series.
Building on over 10 years of experience, HAL2 delivers the following:
To support this update, examples have been revamped for better reusability and understanding, and a new online documentation portal is introduced for enhanced content and easier navigation.
Try it now:
Join the conversation and share your thoughts in the comments.
Solved! Go to Solution.
2025-11-10 6:00 AM
I have not yet done any deeper dive into the whole thing.
For the current projects I work on, it seems a bit too much to deal with to port to the new HAL, but future projects may switch to HAL2.
That said, under os_port you currently only list freertos and no_os
At the same time in the cmsis section, you include CMSIS RTOS2...
Will CMSIS RTOS2 be included in the os_port section? I don't think it makes much sense not to include something that's already in there...
2025-12-21 12:36 AM - edited 2025-12-21 5:57 AM
thanks for providing the preview. I'm late as I don't use U5 in a current project.
I have a proposal for LL: There are some macros unfortunately exposing the internal bus hierarchy.
Like for TIM15 I found.
# grep -RH "#define LL.*A.B.*TIM15" */Drivers/*HAL*/Inc/*ll*.h */*/ll/*.h | sed 's|.*/\([^/]*\):|\1:|' | sed 's|\s*//.*$||; s|\s*/\*.*$||'
stm32c0xx_ll_bus.h:#define LL_APB1_GRP2_PERIPH_TIM15 RCC_APBENR2_TIM15EN
stm32f0xx_ll_bus.h:#define LL_APB1_GRP2_PERIPH_TIM15 RCC_APB2ENR_TIM15EN
stm32f0xx_ll_system.h:#define LL_DBGMCU_APB1_GRP2_TIM15_STOP DBGMCU_APB2_FZ_DBG_TIM15_STOP
stm32g0xx_ll_bus.h:#define LL_APB2_GRP1_PERIPH_TIM15 RCC_APBENR2_TIM15EN
stm32g0xx_ll_system.h:#define LL_DBGMCU_APB2_GRP1_TIM15_STOP DBG_APB_FZ2_DBG_TIM15_STOP
stm32g4xx_ll_bus.h:#define LL_APB2_GRP1_PERIPH_TIM15 RCC_APB2ENR_TIM15EN
stm32g4xx_ll_system.h:#define LL_DBGMCU_APB2_GRP1_TIM15_STOP DBGMCU_APB2FZ_DBG_TIM15_STOP
stm32h5xx_ll_bus.h:#define LL_APB2_GRP1_PERIPH_TIM15 RCC_APB2ENR_TIM15EN
stm32h5xx_ll_system.h:#define LL_DBGMCU_APB2_GRP1_TIM15_STOP DBGMCU_APB2FZR_DBG_TIM15_STOP
stm32h7xx_ll_bus.h:#define LL_APB2_GRP1_PERIPH_TIM15 RCC_APB2ENR_TIM15EN
stm32h7xx_ll_system.h:#define LL_DBGMCU_APB2_GRP1_TIM15_STOP DBGMCU_APB2FZ1_DBG_TIM15
stm32l4xx_ll_bus.h:#define LL_APB2_GRP1_PERIPH_TIM15 RCC_APB2ENR_TIM15EN
stm32l4xx_ll_system.h:#define LL_DBGMCU_APB2_GRP1_TIM15_STOP DBGMCU_APB2FZ_DBG_TIM15_STOP
stm32l4xx_ll_bus.h:#define LL_APB2_GRP1_PERIPH_TIM15 RCC_APB2ENR_TIM15EN
stm32l4xx_ll_system.h:#define LL_DBGMCU_APB2_GRP1_TIM15_STOP DBGMCU_APB2FZ_DBG_TIM15_STOP
stm32u0xx_ll_bus.h:#define LL_APB1_GRP2_PERIPH_TIM15 RCC_APBENR2_TIM15EN
stm32u0xx_ll_system.h:#define LL_DBGMCU_APB1_GRP2_TIM15_STOP DBGMCU_APBFZ2_DBG_TIM15_STOP
stm32u5xx_ll_bus.h:#define LL_APB2_GRP1_PERIPH_TIM15 RCC_APB2ENR_TIM15EN
stm32u5xx_ll_system.h:#define LL_DBGMCU_APB2_GRP1_TIM15_STOP DBGMCU_APB2FZR_DBG_TIM15_STOP
stm32u5xx_ll_bus.h:#define LL_APB2_GRP1_PERIPH_TIM15 RCC_APB2ENR_TIM15EN
stm32u5xx_ll_dbgmcu.h:#define LL_DBGMCU_TIM15_STOP DBGMCU_APB2FZR_DBG_TIM15_STOPThese defines differ across series which hinders portability.
LL_DBGMCU_TIM15_STOP is already a good exmaple because this hides the internal bus hierarchy and makes cross-series porting possible.
Would like to see more of this style like simply LL_PERIPH_TIM15 or so. Maybe they come in addition to the existing ones and later the existing ones become legacy/deprecated.
The peripheral instances have already unique names so there should be no conflicts.
hth
KnarfB