Uart; Rsb-3730 Uart; How To Configure Rs232 Or Rs485 Mode - Advantech RSB-3730 User Manual

Nxp imx8m mini arm cortex-a53 2.5″ sbc with uio40 express
Table of Contents

Advertisement

Get GPIO value
# cat /sys/class/gpio/gpio1/value
3.4

UART

The Linux UART/serial port access from the user is through the tty-devices. The tty-
devices have different names depending on the UART driver on different boards.
RS-485 uses half-duplex communication, which means that one medium is shared
for transmitting and receiving data. Therefore, the system needs to control the RS-
485 transceiver's transmit mode. Usually the UART RTS signal is used to switch the
transmitter on and off.
3.4.1

RSB-3730 UART

Table 3.2: RSB-3730 UART
COM Name
UIO2 com1
COM1/DEBUG2
COM
UIO2 com4
3.4.2

How to Configure RS232 or RS485 Mode

Enter U-boot interrupt mode.
Connect the device to the debug port, and open the debug console.
Press "Ctrl + C" before powering up the device until you get the following information
on the debug console:
Hit any key to stop autoboot: 0
=> <INTERRUPT>
=>
Then you can input the following command to configure UART mode:
RS485 Mode:
=> setenv uart_mode 2:1
=> saveenv
=> reset
RS232 Mode:
=> setenv uart_mode 2:0
=> saveenv
=> reset
Note: The default value is RS232.
The above command "setenv uart_mode 2:1", 2:1 means to set ttymxc2 to RS485
standard mode, and 2:0 means to set ttymxc2 to RS232 mode.
The following RS232 testing method is shared by "/dev/ttymxc0, /dev/ttymxc2, /dev/
ttymxc3", and only needs to be replaced by the UART Name.
RSB-3730 User Manual
.
Device Node
/dev/ttymxc0
/dev/ttymxc1
/dev/ttymxc2
/dev/ttymxc3
Remark
supports RS232
Debug Port
supports RS232/RS485
supports RS232
32

Advertisement

Table of Contents
loading

Table of Contents