Skip to content

boards/arm/ht32f491x3: Add PWM support for the HT32F49163 Starter Kit board#18649

Open
FelipeMdeO wants to merge 2 commits intoapache:masterfrom
FelipeMdeO:feature/esk32-add-pwm
Open

boards/arm/ht32f491x3: Add PWM support for the HT32F49163 Starter Kit board#18649
FelipeMdeO wants to merge 2 commits intoapache:masterfrom
FelipeMdeO:feature/esk32-add-pwm

Conversation

@FelipeMdeO
Copy link
Copy Markdown
Contributor

@FelipeMdeO FelipeMdeO commented Mar 30, 2026

Summary

This PR adds PWM support for the HT32F491x3 ESK32 board.

Changes included:

add HT32F491x3 TMR3 PWM lower-half driver support
register /dev/pwm0 on the ESK32 board
add board-level PWM pin mapping for TMR3 channels 1 to 4
add esk32:pwm configuration for board-level PWM validation
document PWM support, pin mapping, and test procedure for ESK32

Impact

Is new feature added? Yes
Impact on user: esk32:pwm now provides /dev/pwm0 and the pwm example application for board-level PWM testing
Impact on build: No global build changes
Impact on hardware: Yes, ARM/HT32F491x3 ESK32 board support
Impact on documentation: Yes
Impact on security: No

Testing

./tools/configure.sh -l esk32:pwm
make olddefconfig
make -j all
/dev/pwm0 registered successfully
PWM generation tested by invoking the pwm example from NSH
command used: `pwm -f 1000 -d 50 -t 5`
PWM output probed on PA6 with a logic analyzer
1 kHz PWM generated on PA6 with 50% duty cycle as expected
PWM start and stop behavior matched the requested command duration

Add a TMR3-based PWM lower-half driver for the HT32F491x3 port,
register /dev/pwm0 on the esk32 board, and add an esk32:pwm
configuration for board-level validation.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
Document the esk32:pwm configuration, the default TMR3 PWM pin
mapping, the NSH validation command and expected output, and add
a peripheral support table covering the current board status.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
@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 Mar 30, 2026
@FelipeMdeO
Copy link
Copy Markdown
Contributor Author

Hello @xiaoxiang781216 , @acassis , @linguini1 . I am working with this board daily, so I am porting drivers step by step.
I hope add pwm, pulse counter, i2c, dma and usb drivers during the next weeks.

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.

1 participant