mirror of
https://github.com/apache/nuttx.git
synced 2026-10-12 00:30:23 +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> |
||
|---|---|---|
| .. | ||
| hardware | ||
| ameba_allocateheap.c | ||
| ameba_app_start.c | ||
| ameba_board.mk | ||
| ameba_gpio_chip.h | ||
| ameba_i2c_chip.h | ||
| ameba_ipc.c | ||
| ameba_ipc.h | ||
| ameba_irq.c | ||
| ameba_irq.h | ||
| ameba_loguart.c | ||
| ameba_pwm_chip.h | ||
| ameba_spi_chip.h | ||
| ameba_start.c | ||
| ameba_timerisr.c | ||
| ameba_uart_chip.h | ||
| ameba_wifi_init.c | ||
| chip.h | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Make.defs | ||