Difference between revisions of "DESK-MX9-L/Peripherals/UART"

From DAVE Developer's Wiki
Jump to: navigation, search
(Created page with "<section begin=History/> {| style="border-collapse:collapse; " !colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History |- ! style="border-l...")
 
Line 1: Line 1:
<section begin=History/>
+
<section begin="History" />
 
{| style="border-collapse:collapse; "
 
{| style="border-collapse:collapse; "
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
+
! colspan="4" style="width:100%; text-align:left" ; border-bottom:solid 2px #ededed" |History
 
|-  
 
|-  
 
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |2024/01/30
 
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |2024/01/30
Line 7: Line 7:
 
|-
 
|-
 
|}
 
|}
<section end=History/>
+
<section end="History" />
<section begin=Body/>
+
<section begin="Body" />
  
 
==Peripheral UART ==
 
==Peripheral UART ==
Line 16: Line 16:
 
==== AURA SOM ====
 
==== AURA SOM ====
  
Here below an example of device tree modifications to standard DAVE's kit for the ORCA SOM:
+
Here below an example of device tree modifications to standard DAVE's kit for the AURA SOM:
  
From <code>imx8mp-mito8mplus.dtsi</code>:
+
From <code>imx93-aura-cb2001.dts</code>:
  
 
<pre>
 
<pre>
Line 81: Line 81:
 
----
 
----
  
[[Category:AURA]] [[Category:SBCX AURA]]
+
[[Category:AURA]]  
 +
[[Category:SBCX AURA]]

Revision as of 10:39, 31 January 2024

History
2024/01/30 DESK-MX9-L-5.0.0 release


Peripheral UART[edit | edit source]

Device tree configuration[edit | edit source]

AURA SOM[edit | edit source]

Here below an example of device tree modifications to standard DAVE's kit for the AURA SOM:

From imx93-aura-cb2001.dts:

...
...
&lpuart4 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart4>;
	status = "okay";
};
...
&iomuxc {
...
	pinctrl_uart4: uart4grp{
		fsl,pins = <
			MX93_PAD_GPIO_IO14__LPUART4_TX			0x31e
			MX93_PAD_GPIO_IO15__LPUART4_RX			0x31e
		>;
	};
...

Accessing the peripheral in AURA SOM[edit | edit source]

Linux messages at boot time[edit | edit source]

...
[    0.847346] 44380000.serial: ttyLP0 at MMIO 0x44380010 (irq = 18, base_baud = 1500000) is a FSL_LPUART
[    0.856702] printk: console [ttyLP0] enabled
[    0.875438] 44390000.serial: ttyLP1 at MMIO 0x44390010 (irq = 19, base_baud = 1500000) is a FSL_LPUART
[    0.885307] 42580000.serial: ttyLP3 at MMIO 0x42580010 (irq = 20, base_baud = 1500000) is a FSL_LPUART
[    0.895137] 42690000.serial: ttyLP2 at MMIO 0x42690010 (irq = 21, base_baud = 1500000) is a FSL_LPUART
...

Usage with stty[edit | edit source]

N.B. UART mapping respect to ttyLPX is the following one:

LPUART1 (RS232) <-> ttyLP00
LPUART2 (Multiprotocol) <-> ttyLP1
LPUART3 (UART) <-> ttyLP2
LPUART4 (UART) <-> ttyLP3
...
root@desk-mx93:~# stty -F /dev/ttyLP1 115200 -echo -raw
root@desk-mx93:~# cat /dev/ttyLP1 > test_ttyLP1.log &
[1] 716
root@desk-mx93:~# echo "Test loopback" > /dev/ttyLP1
root@desk-mx93:~# cat test_ttyLP1.log
Test loopback

root@desk-mx93:~#

Additional information[edit | edit source]

Serial ports can be used through the standard serial programming API.

For detailed information, please refer to the Serial Programming HOWTO at Serial-Programming-HOWTO