Skip to content

fix(uart): support STM32C5 HAL v2 reset and IRQ handling - #3060

Merged
fpistm merged 1 commit into
stm32duino:mainfrom
cumin777:split/stm32c5-halv2-uart
Aug 27, 2026
Merged

fix(uart): support STM32C5 HAL v2 reset and IRQ handling#3060
fpistm merged 1 commit into
stm32duino:mainfrom
cumin777:split/stm32c5-halv2-uart

Conversation

@cumin777

@cumin777 cumin777 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR fixes UART reset, clock-disable, and IRQ pending-clear helpers when the STM32 HAL v2 driver is enabled.

This PR fixes the following bug:

  • Use the HAL v2 RCC and Cortex/NVIC helper APIs for UART7/USART6.
  • Breaking changes

The HAL v2 build does not provide the legacy helper implementation used by these paths. Without this change, UART deinitialization and interrupt handling for the affected peripherals do not compile or behave correctly on STM32C5 HAL v2 targets.

Dependencies and split

Validation

  • The change is limited to the HAL v2 conditional paths in libraries/SrcWrapper/src/stm32/uart.c.
  • Hardware validation and CI builds will be provided by the normal CI matrix.

Code formatting

  • AStyle formatting is unchanged; CI should verify the repository formatting checks.

Closing issues

None.

@fpistm fpistm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cumin777
Thanks for the PR.
I missed them when added HALv2 and STM32C5 support. As the STM32C562RE does not have those U(S)ART. I thought I have checked 😉

@github-project-automation github-project-automation Bot moved this from In progress to Reviewer approved in STM32 core based on ST HAL Aug 27, 2026
@fpistm
fpistm marked this pull request as ready for review August 27, 2026 11:43
@fpistm
fpistm merged commit 4ee32c3 into stm32duino:main Aug 27, 2026
29 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in STM32 core based on ST HAL Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

2 participants