8,367
edits
Changes
→40pin UART test
# As can be seen from the table below, the uart available for Orange Pi 3B is uart3, uart7, and uart9. There are three sets of uart bus
::[[File:pi3b-img268.png]]
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''As can be seen from the above table, i2c3_m0 and uart3_m0 are reused by pins, and the two cannot be opened at the same time'''</big>|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''In the Linux system, the uart in 40pin is closed by default, and it needs to be opened manually to use.'''</big>
'''Add the configuration of the red font part below to the /boot/orangepiEnv.txt, and then restart the Linux system to open the uart3, uart7, and uart9 at the same time. If you only need to open one, you can fill in one..'''
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''
'''<span style="color:#FF0000">overlays=uart3-m0 uart7-m2 uart9-m2</span>'''|}
<ol start="2" style="list-style-type: decimal;">
<li>After entering the Linux system, first confirm whether there is a device node corresponding to uart under/dev</li></ol>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~# '''ls /dev/ttyS*'''
/dev/ttyS1 '''/dev'''/'''ttyS3 /dev/ttyS7 /dev/ttyS9'''|}</ol>
<ol start="3" style="list-style-type: decimal;">
<li>Then start testing the uart interface, first use the rx and tx of the uart interface to be tested by DuPont</li></ol>
{| class="wikitable" style="width:800px;text-align: center;"
|-
|
[[File:pi3b-img269.png]]
</ol>
<ol start="4" style="list-style-type: decimal;">
<li><p>Use the '''gpio serial''' command to test the loop function of the serial port as shown below. If you can see the following printing, it means that the serial communication is normal</p>
<ol style="list-style-type: lower-alpha;">
<li>Test UART3</li></ol></li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''sudo gpio serial /dev/ttyS3'''
[sudo] password for orangepi: #Enter the password here.
Out: 0: -> 0
Out: 5: -> 5^C
|}</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>Test UART7</li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''sudo gpio serial /dev/ttyS7'''
[sudo] password for orangepi: #Enter the password here.
Out: 0: -> 0
Out: 5: -> 5^C
|}</ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li>Test UART9</li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''sudo gpio serial /dev/ttyS9'''
[sudo] password for orangepi: #Enter the password here.
Out: 0: -> 0
Out: 5: -> 5^C
|}
</ol>
</li></ol>
<span id="pwm-test-method"></span>
=== PWM test method ===