MaNu_MaLoNe
Posts: 2
Joined: Wed Jan 17, 2018 1:30 pm

Both UARTs enabled + serial (Linux) console on UART1. How to?

Wed Jan 17, 2018 1:53 pm

Hello,

Few months ago I designed a circuit based on CM3L. It was devised to use both UARTs on GPIOs 14/15 and 32/33 (both pairs can be UART0 or UART1). Now my client is using UARTO on GPIOs 14/15 for communicating with a microcontroller. Now they are asking me to enable the sencond UART that was placed with the purpose of serving as serial debug port (Linux console).

Is it possible to use UART1 as Linux console instead of UART0? If so... What should I do to remap UARTs in GPIOs, enable both UARTs, enable Linux console and route it to UART1? If possible all done in device tree and "/boot" config files better than using raspi-config and gpio utility.

Thanks in advance!
Manuel.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1734
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Both UARTs enabled + serial (Linux) console on UART1. How to?

Wed Jan 17, 2018 9:43 pm

You can enable UART1 and map it to GPIOs 32 and 33 by adding the following to /boot/config.txt:

Code: Select all

dtoverlay=uart1,txd1_pin=32,rxd1_pin=33
To create a linux console on UART1 (ttyS0), add "console=ttyS0,115200" to /boot/cmdline.txt.

MaNu_MaLoNe
Posts: 2
Joined: Wed Jan 17, 2018 1:30 pm

Re: Both UARTs enabled + serial (Linux) console on UART1. How to?

Wed Jan 24, 2018 6:35 pm

Thanks a lot PhilE!

It worked. The only issue is that I had to place core_freq at 250Mhz in order to make the UART work with the correct baudrate.

Manuel.

Killertechno
Posts: 130
Joined: Wed Jan 02, 2013 8:28 am

Re: Both UARTs enabled + serial (Linux) console on UART1. How to?

Wed Feb 21, 2018 6:06 pm

MaNu_MaLoNe wrote:
Wed Jan 24, 2018 6:35 pm

It worked. The only issue is that I had to place core_freq at 250Mhz in order to make the UART work with the correct baudrate.
Where?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1734
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Both UARTs enabled + serial (Linux) console on UART1. How to?

Wed Feb 21, 2018 6:34 pm

core_freq=250 in config.txt.

Return to “Compute Module”

Who is online

Users browsing this forum: No registered users and 3 guests