8,367
edits
Changes
→PWM test method
<li><p>As can be seen from the table below, the available PWM for Orange Pi 5 Plus includes six channels of PWM: pwm0, pwm1, pwm11, pwm12, pwm13 and pwm14</p>
<p>[[File:media/image304.png|575x137px]]</p></li>
<li><p>The corresponding pins of PWM in 40pin are shown in the table below. Only one of PWM0_M0 and PWM0_M2, PWM1_M0 and PWM1_M2, PWM14_M0 and PWM14_M2 can be used at the same time, and they cannot be used at the same time. They are all the same PWM, but they are connected to different pins. Please don’t think that they are two different PWM bus.</p></li></ol>
{| class="wikitable" style="width:800px;"
| style="text-align: left;"| '''pwm14-m0'''
|}
</ol>
<ol start="3" style="list-style-type: decimal;">
<li><p>In the linux system, the PWM in the 40 pin is turned off by default, and it needs to be turned on manually before it can be used. The detailed steps are as follows:</p>
<li><p>Then it can be known from the table below that the base address of the pwm14 register is febf0020, and then look at the output of the '''ls /sys/class/pwm/ -l''' command, you can see that pwmchip2 is linked to febf0020.pwm, so pwm14 corresponds to pwmchip as pwmchip2</p>
<p>[[File:media/image318.png|575x287px]]</p></li>
<li><p>Then use the following command to make pwm14 output a 50Hz square wave (please switch to the root user first, and then execute the following command)</p></li></ol>
{| class="wikitable" style="width:800px;"
[[File:media/image319.png|575x346px]]
|}
</ol>
<ol start="8" style="list-style-type: decimal;">
<li>The test method of pwm14 demonstrated above is similar to other pwm test methods.</li></ol>