risc-v/gd32vw55x: add pwm example to gd32vw553k-start

Add a "pwm" configuration that exercises the PWM driver on TIMER1. It is the
nsh base plus the PWM driver, registered as /dev/pwm0 and driven by the pwm
example (100 Hz, 50 % duty by default).

TIMER1 channel 0 is routed to PA0 on the J1 header (AF1) so the waveform can
be probed there; the other channels stay unrouted.

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
This commit is contained in:
Jorge Guzman 2026-07-24 14:12:17 -03:00 committed by CeDeROM
parent 30735584a4
commit e33a1f9943
3 changed files with 83 additions and 0 deletions

View file

@ -238,6 +238,24 @@ driver::
``sht3x_register()`` in ``gd32_bringup.c`` (the i2ctool still finds it at
its real address regardless).
pwm
---
NSH plus the PWM driver on TIMER1, registered as ``/dev/pwm0`` and driven by
the ``pwm`` example. Channel 0 (TIMER1_CH0) is routed to **PA0** on the J1
header (AF1), so the waveform can be probed there.
Run the example -- it drives a 5 s pulse train at the configured frequency and
duty (100 Hz, 50 % by default)::
nsh> pwm
pwm_main: starting output with frequency: 100 channel: 1 duty: 00007fff
pwm_main: stopping output
``pwm -f <hz> -d <pct> -t <seconds>`` overrides the frequency, duty and
duration for a single run. Put an LED (with a series resistor) or a scope on
PA0 to see it.
littlefs
--------