Open main menu

Wiki-Orange Pi β

Changes

Orange Pi 5 Plus

266 bytes added, 19:17, 6 June 2023
40 pin UART test
<li><p>As can be seen from the table below, the uarts available for Orange Pi 5 Plus are uart1, uart3, uart4, uart6, uart7 and uart8, a total of 6 sets of uart buses</p>
<p>[[File:media/image304.png|575x137px]]</p></li>
<li><p>The corresponding pins of the 6 groups of UART buses in 40pin are shown in the following table:</p></li></ol>
{| class="wikitable" style="width:800px;"
|-
| style="text-align: left;"| '''UART bus'''
| style="text-align: left;"| '''uart8-m1'''
|}
</ol>
<ol start="3" style="list-style-type: decimal;">
<li><p>In the linux system, the UART in the 40 pins is closed by default, and it needs to be opened 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-confi'''g, normal users remember to add &gt; '''sudo''' permission</p>
{| class="wikitable" style="width:800px;" |-|<p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p>|}</li>
<li><p>Then select '''System'''</p>
<p>[[File:media/image234.png|404x186px]]</p></li>
</li>
<li><p>After entering the linux system, first confirm whether there is a device node corresponding to uart under /dev</p>
{| class="wikitable" style="width:800px;" |-|<p>orangepi@orangepi:~$ '''ls /dev/ttyS*'''</p>|}</li>
<li><p>Then start to test the uart interface, first use the DuPont line to short the rx and tx pins of the uart interface to be tested</p></li>
<li><p>Then use the '''serialTest.py''' program in '''wiringOP-Python/examples''' to test the loopback function of the serial port. As shown below, if you can see the print below, it means the serial port communication is normal.</p>
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''/dev/ttySX needs to be replaced with the serial number of the specific uart device node.'''</p></big>|} {| class="wikitable" style="width:800px;" |-|
<p>root@orangepi:~/wiringOP-Python/examples# '''python3 serialTest.py --device &quot;/dev/ttySX&quot;'''</p>
<p>Out: 0: -&gt; 0</p>
<p>Out: 3: -&gt; 3</p>
<p>Out: 4:^C</p>
<p>exit</p>|}</li></ol>
<span id="hardware-watchdog-test"></span>