Changes

Jump to: navigation, search

Orange Pi 3B

935 bytes added, 13:53, 23 August 2023
PWM test method
# From the table below, the pwm11 available for Orange Pi 3B
::[[File:pi3b-img270-1.png]]
<ol start="2" 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><ol style="list-style-type: lower-alpha;"><li><p>First run '''orangepi-config''', normal users remember to add sudo permission</p>{| class="wikitable" style="width:800px;"
|-
|
'''In the Linux system, the pwm in 40pin is closed by default, and it needs to be opened manually to use..'''  '''Add the configuration of the red font part below to the /boot/orangepiEnv.txt, and then restart the Linux system to open the pwm11.'''  <p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt''' orangepi-config'''<span style="color:#FF0000">overlays=pwm11-m1</spanp>'''
|}
</li>
<li><p>Then select '''System'''</p>
<p>[[File:pi3b-1.png]]</p>
</li>
<li><p>Then select '''Hardware'''</p>
<p>[[File:pi3b-2.png]]</p>
</li>
<li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''space''' to select the PWM configuration you want to open</p>
<p>[[File:pi3b-3-4.png]]</p>
</li>
<li><p>Then select '''<Save>''' to save</p>
<p>[[File:pi3b-4.png]]</p>
</li>
<li><p>Then select '''<Back>'''</p>
<p>[[File:pi3b-5.png]]</p>
</li>
<li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p>
<p>[[File:pi3b-6.png]]</p>
</li>
</ol>
</li></ol>
<ol start="23" style="list-style-type: decimal;"><li>After opening a pwm, a there will be an extra pwmchipX in '''/sys/class/pwm/''' (X is a specific number) will be available in, for example, after opening pwm11, check the pwmchipX under '''/sys/class/pwm/'''one becomes two</li>
{| class="wikitable" style="width:800px;"
|-
|}
</ol>
<ol start="34" style="list-style-type: decimal;"><li><p>Which pwmchip above corresponds to pwm11 above? Let, let's first check out the output of the '''ls /sys/class/pwm/ -l''' commandfirst, as shown below: </p></li><li><p>The Then it can be known from the table below that the base address of the pwm11 register is Fe6F0030. Then see fe6f0030, and then look at the output of the '''ls /sys/class/pwm/ -l''' command, you can see that the pwmchip1 is linked to fe6f0030.pwm is connected to the pwmchip1, so the PWM11 corresponding pwm11 corresponds to pwmchip is as pwmchip1</p></li>
<div class="figure">
</div></ol>
<ol start="56" style="list-style-type: decimal;"><li>Then use the following command to allow make pwm11 to output a 50Hz square wave (please switch to the root user first, and then execute the following command)</li>
{| class="wikitable" style="width:800px;"
|-
[[File:pi3b-img272.png]]
 
<li>The test method of pwm11 demonstrated above is similar to other pwm test methods.</li>
</ol>
<span id="how-to-install-and-use-wiringop-python"></span>

Navigation menu