Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX6UL-L/Peripherals/UART

167 bytes removed, 10:31, 16 July 2021
no edit summary
Here below an example of device tree configuration used on standard DAVE's kit for the [[AXEL ULite SOM]]:
From the Carrier <code>imx6ul-lynxaxelulite-som0013-cb002fcb003a.dts</code> device tree:
<pre>
&uart2 uart3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2_flowpinctrl_uart3>; fsl,uart-has-rtscts;
status = "okay";
};
</pre>... From <code>imx6qdl-axelcommon.dtsi</code>: <pre>..
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog_gpios>;
imx6ul-lynx axelulite {
...
...
pinctrl_uart2_flow uart { pinctrl_uart3: uart2grp-flow uart3grp { fsl,pins = < MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX MX6UL_PAD_UART3_RX_DATA__UART3_DCE_RX 0x1b0b1 MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX MX6UL_PAD_UART3_TX_DATA__UART3_DCE_TX 0x1b0b1 MX6UL_PAD_UART2_CTS_B__UART2_DCE_CTS 0x1b0b1 MX6UL_PAD_UART2_RTS_B__UART2_DCE_RTS 0x1b0b1>; >};
};
...
...
...
[ 0.424294437613] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 21, base_baud = 5000000) is a IMX[ 1.125015167221] console [ttymxc0] enabled[ 1.130189] 2024000.serial: ttymxc7 at MMIO 0x2024000 (irq = 22, base_baud = 5000000) is a IMX[ 1.140851] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 58, base_baud = 5000000) is a IMX[ 1.150972172839] 21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 5958, base_baud = 5000000) is a IMX
...
...
UART8 <-> ttymxc7
...
 
 
For exmaple, using a loopback HW connection (RX shortcircuited to TX on UART232 port) it is possibile to test the send and receive data using the <code>ttymxc2</code> device:
<pre class="workstation-terminal">
root@desk-mx6ul-axelulite:~# stty -F /dev/ttymxc7 ttymxc2 115200 -echoroot@desk-mx6ul-axelulite:~# cat /dev/ttymxc7 ttymxc2 &
[1] 331
root@desk-mx6ul-axelulite:~# echo "Test loopback" > /dev/ttymxc7ttymxc2root@desk-mx6ul-axelulitelynx:~#Test loopback 
</pre>
8,226
edits