SCM186 NXP i.MX 8M Plus ARM-based Evaluation Kit
3.5.1.5 Serial Port
Herodotus supports the serial port with different mode & baud rates. This section explains
how to test the switch mode and test.
Configuration for Serial Ports
Herodotus supports below several serial ports, these ports provide varies protocols, please
refer to following list for the supported list.
⚫
/dev/ttymxc0
◼
RS232
⚫
/dev/ttymxc2
◼
RS232
◼
RS485
To exercise the serial port for /dev/ttymxc2, there are several modes must be configured by
the switch, the following command demonstrates the test though all protocols, the default
mode is RS232.
Enable serial port switch
⚫
sh-5.1#
cd /sys/class/gpio
sh-5.1#
echo 496 > export
sh-5.1#
echo 497 > export
sh-5.1#
echo out > gpio496/direction
sh-5.1#
echo out > gpio497/direction
Switch serial port to RS232
⚫
sh-5.1#
echo 1 > gpio496/value
sh-5.1#
echo 0 > gpio497/value
Switch serial port to RS485
⚫
sh-5.1#
echo 0 > gpio496/value
sh-5.1#
echo 1 > gpio497/value
26
Herodotus BSP User Guide
Need help?
Do you have a question about the SCM186 and is the answer not in the manual?