mirror of
https://github.com/apache/nuttx.git
synced 2026-10-12 16:50:21 +00:00
Wire the shared Ameba PWM driver (arch/arm/src/common/ameba/ameba_pwm.c) to RTL8720F. The chip spreads PWM across several four-channel timers (TIM4/TIM5); this port drives TIM4 as the single time base with four compare channels, matching the shared driver's model. A new ameba_pwm_chip.h supplies the RTL8720F specifics taken from the SDK fwlib headers: TIM4 at the non-secure base 0x401c7000, 40 MHz input clock, IRQ 9 (TIMER4_IRQ), crossbar pad-mux codes 45..48 (PINMUX_FUNCTION_TIM4_PWM0..3) and the distinct function/clock enable bits (APBPeriph_PWM0 / APBPeriph_PWM0_CLOCK). The board registers one timer at /dev/pwm0 with channel 1 on PB18 and channel 2 on PB19 for the pwm example; edit the table to match a board's wiring. The common driver is not touched. Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn> Assisted-by: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| boards/rtl8720f_evb | ||
| index.rst | ||