Skip to content

arch/arm/stm32h5: Add capture support - #20937

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

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

Conversation

@darrylring

Copy link
Copy Markdown
Contributor

Summary

Clone the capture support from the STM32H7. Once again, this should be as close to the H7 port with only the necessary changes to the H5. I know @raiden00pl is working on unifying and commonizing the STM32 code, so don't want to make things harder.

There are some bug fixes and improvements that can be made, but I think it's best to handle those separately.

Note: there's an off-by-one error which causes the returned values to be slightly wrong. This is one of the bugs that will be fixed separately.

Impact

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

Testing

Testing on the NUCLEO-H563ZI using the capture config, with #20936 and the related nuttx-apps applied, and the cap example app:

image
nsh> cap -n1
cap_main: Hardware initialized. Opening the capture device: /dev/cap0
cap_main: Number of samples: 1
pwm duty cycle: 24 % 
pwm frequency: 10004 Hz
image
nsh> cap -n1
cap_main: Hardware initialized. Opening the capture device: /dev/cap0
cap_main: Number of samples: 1
pwm duty cycle: 89 % 
pwm frequency: 20016 Hz

Clone the capture support from the STM32H7.

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: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. Board: arm labels Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 2026 •

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.

Add missing config items to the capture and dac defconfigs.

Signed-off-by: Darryl Ring <[email protected]>
@acassis
acassis merged commit 63b6d9e into apache:master Oct 24, 2026
31 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: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants