AFE-E630 COM0、COM1
From ESS-WIKI
Revision as of 09:47, 17 December 2024 by Xingxing.li (talk | contribs)
UART(RS232 or RS485)
Configure RS232 or RS485
Only ttyS3 and ttyS4 support RS485 mode and the default mode is RS485. Set RS232 or RS485 separately (0 means to RS232; 1 means to RS485):
Set ttyS3 to RS232 mode and ttyS4 to RS232 mode
# fw_setenv uart_mode_cpu 3:0,4:0 # reboot
Set ttyS3 to RS232 mode and ttyS4 to RS485 mode
# fw_setenv uart_mode_cpu 3:0,4:1 # reboot
Set ttyS3 to RS485 mode and ttyS4 to RS232 mode.
# fw_setenv uart_mode_cpu 3:1,4:0 # reboot
Set ttyS3 to RS485 mode and ttyS4 to RS485 mode.
# fw_setenv uart_mode_cpu 3:1,4:1 # reboot
For example, set COM0 ,“Baud rate” to 115200 ,“Data bits” to 8,“Stop bits” to 1,“Parity” to None,“Flow control” to None.
# stty -F /dev/ttyS3 115200 cs8 -parenb -cstopb -crtscts