Open main menu

Wiki-Orange Pi β

Changes

Orange Pi 3B

427 bytes added, 14:49, 11 August 2023
40pin's 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="width:800px;background-color:#ffffdc;" |-| <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="width:800px;background-color:#ffffdc;" |-| <big>'''In the Linux system, the UART 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 UART3, UART7, and UART9 at the same time. If you only need to open one, you can fill in one'''</big>
orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt'''
'''overlays=uart3-m0 uart7-m2 uart9-m2'''
|}
<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, and 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;"
|-
|
|Corresponding to the 7 pin
|}
</ol>
<ol start="4" style="list-style-type: decimal;">
<li><p>Use the '''serialTest.py''' program in Examples to test the loop function of the serial port. If you can see the printing below, 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;" |-|
root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device \'''
exit
|}</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>Test UART7</li></ol>{| class="wikitable" style="width:800px;" |-|
root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device \'''
exit
|}</ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li>Test UART9</li></ol>{| class="wikitable" style="width:800px;" |-|
root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device \'''
exit
|}</ol>
<span id="hardware-watch-the-door-dog-test"></span>