Skip to content

arch/arm/stm32h5: Add DAC support - #20891

Merged
acassis merged 2 commits into
apache:masterfrom
darrylring:feature/stm32h5-dac
Oct 23, 2026
Merged

acassis merged 2 commits into
apache:masterfrom
darrylring:feature/stm32h5-dac

Conversation

@darrylring

Copy link
Copy Markdown
Contributor

Summary

Copy DAC support from STM32H7 with no DMA or timer control and accounting for the minor differences between the H7 and H5.

I do have DMA and timer support working, but it requires changes to the GPDMA driver itself, and I think it's worth evaluating those changes separately. Testing is still ongoing there. No other STM32 family with the GPDMA peripheral has DAC support in NuttX yet. I think this will be able to support the U5, U3, and C5 as well, but I'm not able to test those.

This first change is small and low risk.

NOTE: The STM32H5 errata sheet indicates that the DAC output may not work if the DAC kernel clock is not HCLK. I hit this issue in my testing, so an compile-time error has been added to save people from similar frustration.

Impact

No impact to existing users, since this is a new feature.

Testing

A dac config has been added to the NUCLEO-H563ZI board and the output has been checked using the dac NSH builtin on pin PA5 (CN7 pin 10, labeled SCK D13).

Copy DAC support from STM32H7 with no DMA or timer control and
accounting for the differences between the H7 and H5

Assisted-by: Claude:claude-sonnet-5-5
Signed-off-by: Darryl Ring <[email protected]>
This adds a new board configuration enabling the DAC channel 2
(connected to PA5). Channel 1 cannot be used on this board because it is
used to sense the VBUS voltage through a voltage divider

Assisted-by: Claude:claude-sonnet-5-5
Signed-off-by: Darryl Ring <[email protected]>
@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Arch: arm Issues related to ARM (32-bit) architecture Size: L The size of the change in this PR is large Board: arm labels Oct 22, 2026
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

@acassis
acassis merged commit d94ca30 into apache:master Oct 23, 2026
52 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: arm Issues related to ARM (32-bit) architecture Area: Documentation Improvements or additions to documentation Board: arm Size: L The size of the change in this PR is large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants