PWM Driver

PWM (Pulse Width Modulation) is a technique for digitally encoding analog signal levels. The RTOS includes a PWM driver, enabling applications to access the PWM device via the PWM device management interface provided by RT-Thread, through which they can configure parameters such as period and duty cycle. Additionally, the system includes a test program capable of setting the PWM duty cycle of PWM, which is located at rtthread/bsp/starfive/jh7110/applications/pwm_test.c.

Figure 1. PWM Test Case
Read the PWM signal pins with an oscilloscope. The test result is shown as follows:
Figure 2. PWM Test Result