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

From DAVE Developer's Wiki
Jump to: navigation, search
m (U0007 moved page DESK-MX9-L/Pheripherals/UART to DESK-MX9-L/Peripherals/UART without leaving a redirect)
 
Line 3: Line 3:
 
! 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:#73B2C7; padding:5px; color:white"|Issue Date
! 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" |DESK-MX9-L-5.0.0 release
+
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
 +
|-
 +
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; 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:#edf8fb; padding:5px; color:#000000" |DESK-MX9-L-5.0.0 release
 
|-
 
|-
 
|}
 
|}
 
<section end="History" />
 
<section end="History" />
 +
__FORCETOC__
 
<section begin="Body" />
 
<section begin="Body" />
  
Line 14: Line 18:
 
=== Device tree configuration ===
 
=== Device tree configuration ===
  
==== AURA SOM ====
+
Here below is an example of device tree modifications to standard DAVE's kit for the AURA SOM:
 
 
Here below an example of device tree modifications to standard DAVE's kit for the AURA SOM:
 
  
 
From <code>imx93-aura-cb2001.dts</code>:
 
From <code>imx93-aura-cb2001.dts</code>:
Line 40: Line 42:
 
</pre>
 
</pre>
  
===Accessing the peripheral in AURA SOM===
+
===Accessing the peripheral===
 
====Linux messages at boot time====
 
====Linux messages at boot time====
  
Line 56: Line 58:
 
'''N.B.''' UART mapping respect to <code>ttyLPX</code> is the following one:
 
'''N.B.''' UART mapping respect to <code>ttyLPX</code> is the following one:
  
  LPUART1 (RS232) <-> ttyLP00
+
  LPUART1 <-> ttyLP0
  LPUART2 (Multiprotocol) <-> ttyLP1
+
  LPUART2 <-> ttyLP1
  LPUART3 (UART) <-> ttyLP2
+
  LPUART3 <-> ttyLP2
  LPUART4 (UART) <-> ttyLP3
+
  LPUART4 <-> ttyLP3
 
  ...
 
  ...
  
Line 79: Line 81:
 
For detailed information, please refer to the Serial Programming HOWTO at [http://tldp.org/HOWTO/Serial-Programming-HOWTO/index.html Serial-Programming-HOWTO]
 
For detailed information, please refer to the Serial Programming HOWTO at [http://tldp.org/HOWTO/Serial-Programming-HOWTO/index.html Serial-Programming-HOWTO]
  
----
+
<section end="Body" />
  
[[Category:AURA]]
+
[[Category:AURA]]
[[Category:SBCX AURA]]
 

Latest revision as of 09:34, 1 February 2024

History
Issue Date Notes
2024/01/30 DESK-MX9-L-5.0.0 release



Peripheral UART[edit | edit source]

Device tree configuration[edit | edit source]

Here below is 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[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 <-> ttyLP0
LPUART2 <-> ttyLP1
LPUART3 <-> ttyLP2
LPUART4 <-> 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