Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX8M-L/Peripherals/UART

1,776 bytes added, 12:08, 15 February 2023
no edit summary
=== Device tree configuration ===
 
==== ORCA ====
 
Here below an example of device tree modifications to standard DAVE's kit for the ORCA SOM:
</pre>
==== MINI ==== Here below an example of device tree configuration used on standard DAVE's kit for the MITO 8M Mini SOM: From <code>imx8mm-mito8mmini.dts</code>: <pre>&uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; assigned-clocks = <&clk IMX8MM_CLK_UART1>; assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>; fsl,uart-has-rtscts; status = "okay";};......&iomuxc {...... pinctrl_uart1_en: uart1_en { fsl,pins = < MX8MM_IOMUXC_SAI5_RXD3_GPIO3_IO24 0x19 >; };... pinctrl_uart1: uart1grp { fsl,pins = < MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX 0x140 MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX 0x140 MX8MM_IOMUXC_UART3_RXD_UART1_DCE_CTS_B 0x140 MX8MM_IOMUXC_UART3_TXD_UART1_DCE_RTS_B 0x140 >; };......</pre> ===Accessing the peripheralin ORCA SOM===
====Linux messages at boot time====
<pre class="workstation-terminal">
root@desk-mx8mp:~# stty -F /dev/ttymxc3 ttymxc0 115200 -echo-rawroot@desk-mx8mp:~# cat /dev/ttymxc3 ttymxc0 > test_ttymxc0.log &[21] 555622root@desk-mx8mp:~# echo "Test loopback" > /dev/ttymxc0root@desk-mx8mp:~# cat test_ttymxc0.logTest loopback</pre> ===Accessing the peripheral in MINI SOM=======Linux messages at boot time==== <pre class="workstation-terminal">......[ 0.724202] 30860000.serial: ttymxc0 at MMIO 0x30860000 (irq = 32, base_baud = 5000000) is a IMX[ 0.778356] 30890000.serial: ttymxc1 at MMIO 0x30890000 (irq = 34, base_baud = 1500000) is a IMX[ 0.787035] printk: console [ttymxc1] enabled......root@desk-mx8mp:~#</pre> ==== Usage with stty ===='''N.B.''' UART mapping respect to <code>ttymxcX</code> is the following one:  UART1 (RS232/RS485/RS422 port DB9) <-> ttymxc0 UART2 (Serial Port) <-> ttymxc1 UART3 (PMOD) <-> ttymxc2 UART4 (UART for Cortex-M4) <-> ttymxc3 ... <pre class="workstation-terminal">root@desk-mx8mm:~# stty -F /dev/ttymxc0 115200 -echo -rawroot@desk-mx8mpmx8mm:~# cat /dev/ttymxc0 > test_ttymxc0.log &[1] 363root@desk-mx8mm:~# echo "Test loopback" > /dev/ttymxc0root@desk-mx8mm:~# cat test_ttymxc0.log Test loopback
</pre>
dave_user
427
edits