8,367
edits
Changes
→40pin PWM test
# Android enables '''PWM11''' by default, and the corresponding pin is located at 40pin as shown in the figure below
::[[File:cm4-img466.png]]
<ol start="2" style="list-style-type: decimal;">
<li>First click on the wiringOP icon to open the wiringOP APP</li></ol>
[[File:cm4-img444.png]]
</ol>
<ol start="3" style="list-style-type: decimal;">
<li>Then click the '''PWM_TEST''' button on the main interface of wiringOP to enter the PWM test interface</li></ol>
[[File:cm4-img467.png]]
</ol>
<ol start="4" style="list-style-type: decimal;">
<li>The base address corresponding to PWM11 is '''fe6f0030''', here pwmchip0 shows '''fdd70020.pwm''' on the right, then you need to click the drop-down option to select other pwmchips until '''fe6f0030.pwm''' is displayed on the right</li></ol>
[[File:cm4-img468.png]]
</ol>
<ol start="5" style="list-style-type: decimal;">
<li>When the drop-down option selects '''pwmchip3''', the corresponding base address of PWM11 is '''fe6f0030''' on the right</li></ol>
[[File:cm4-img469.png]]
</ol>
<ol start="6" style="list-style-type: decimal;">
<li>Then confirm the PWM channel, the default is channel 0, and confirm the PWM cycle, the default configuration is '''50000ns''', converted to PWM frequency is '''20KHz''', you can modify it yourself, click the '''EXPORT''' button to export '''PWM11'''</li></ol>
[[File:cm4-img470.png]]
</ol>
<ol start="7" style="list-style-type: decimal;">
<li>Then drag the drag bar below to change the PWM duty cycle, and then check Enable to output the PWM waveform</li></ol>
[[File:cm4-img471.png]]
</ol>
<ol start="8" style="list-style-type: decimal;">
<li>Then use an oscilloscope to measure the No. 32 pin in the 40pin of the development board, and you can see the following waveform</li></ol>
[[File:cm4-img472.png]]
</ol>
<span id="how-to-use-adb"></span>
== How to use ADB ==