Connecting Serial Console to the NXP i.MX RT1170 EVK Board Print

 

Running Linux (uClinux) on the i.MX RT1170 will require a serial console. U-Boot and Linux make use of the serial console to print messages and provide an interactive user interface. You won't be able to do much unless you have access to the serial console.

Both U-Boot and Linux are configured to use LPUART1 for the serial console on the NXP i.MX RT1170 EVK.


Connecting Serial Console Using a microUSB Cable

On the NXP i.MX RT1170 EVK, LPUART1 interface is available at UART level on the J11 connector on the baseboard if a microUSB cable connected to the development host.

Assuming a connection using a microUSB cable on the Linux PC the i.MX RT1170 serial console will be visible as a . /dev/ttyACMx device. The U-Boot and Linux software configures the console for 115.2 Kps operation.

There are various serial communication tools available for Linux, the most popular perhaps being kermitkermit is a very powerful tool that can be run in interactive mode or controlled by a script. There is abundant documentation on kermit available in the Internet, if you require details.

One possibility is to define on the host a shell script similar to the one below:

$ vi console-imxrt.script
#!/usr/bin/kermit

set port /dev/ttyACM0
set speed 115200
set carrier-watch off
set flow-control none
set prefixing all
c

Change the file mode to make the script an executable file:

$ chmod +x console-imxrt.script

Then run the script whenever you need to get access to the console (you will need sufficient system privilegies to run this script):

$ sudo ./console-imxrt.script>
[sudo] password for :>
Connecting to /dev/ttyACM0, speed 115200>
Escape character: Ctrl-\ (ASCII 28, FS): enabled>
Type the escape character followed by C to get back,>
or followed by ? to see other options.>
---------------------------------------------------->
>
U-Boot 2022.04 (Oct 12 2023 - 14:19:15 +0000)>
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824 (release)>
GNU ld (GNU Arm Embedded Toolchain 10.3-2021.10) 2.36.1.20210621 >
=>

To exit kermit, type Ctrl-\ and then q.


Connecting Serial Console Using a USB UART Dongle

On the NXP i.MX RT1170 EVK, LPUART1 interface is available at UART level on J31.2 and J32.2 connectors. Remove jumpers from J31 and J32 connectors to access the pins. In order to connect the serial console to a PC, you must convert the UART interface either to an RS-232 interface or to a USB interface. This requires connecting an external device ("dongle") to the i.MXRT1170 EVK. There are various such devices available on the market. One specific device we have been using (among others) is the WaveShare FT232 USB UART board:

i.MX RT1170 i.MX RT1170 Function NXP i.MX RT1170 EVK Boad
Connection
WaveShare FT232 USB UART Board Connection Notes
GPIO_AD_25 lpuart1.RXD J32.2 CON6.3 (TXD)
GPIO_AD_24 lpuart1.TXD J31.2 CON6.4 (RXD)
GND GND J1.8 or J38.9 CON6.2 (GND)


To power the board up from a 5V wall power supply, check that J38 have a jumper on J38.1 and J38.2, then set the SW5 switch to the "2-3" position.

Assuming a connection using an USB UART board, on the Linux PC the i.MX RT1170 serial console will be visible as a /dev/ttyUSBx device. The U-Boot and Linux software configures the console for 115.2 Kps operation.

One possibility is to define on the host a shell script similar to the one below:

$ vi console-imxrt1170.script
#!/usr/local/bin/kermit

set port /dev/ttyUSB0
set speed 115200
set carrier-watch off
set flow-control none
set prefixing all
c

Change the file mode to make the script an executable file:

$ chmod +x console-imxrt1170.script

Then run the script whenever you need to get access to the console (you will need sufficient system privelegies to run this script):

$ sudo ./console-imxrt1170.script
[sudo] password for :
Connecting to /dev/ttyUSB0, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------

=> version
U-Boot 2022.04 (Aug 18 2023 - 04:03:26 +0000) arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824 (release) GNU ld (GNU Arm Embedded Toolchain 10.3-2021.10) 2.36.1.20210621 =>

To exit kermit, type Ctrl-\ and then q.