Configurating the serial port

This is the place for software discussions not having a dedicated subforum

Configurating the serial port

Postby jwinius » Mon Sep 30, 2013 2:19 pm

Hi folks,

My Wandboard is a SOLO model that I'm using together with Debian 7.1. I'm attempting to configure the serial port, but I'm beginning to wonder if that's currently possible. After boot up, dmesg mentions:

Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait video=
...
2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 58, base_baud = 5000000) is a IMX
console [ttymxc0] enabled

Also:

~# setserial -a /dev/ttymxc0
/dev/ttymxc0, Line 0, UART: undefined, Port: 0x0000, IRQ: 58
Baud_base: 5000000, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal

So, the UART type and port address are unknown. I believe the latter is because /proc/ioports is empty and the device uses parts of the memory address space for that purpose instead (MMIO addresses).

If not with setserial, is there some way to configure the serial port?

Thanks,

Jaap
jwinius
 
Posts: 6
Joined: Mon Sep 30, 2013 12:56 pm

Re: Configurating the serial port

Postby jwinius » Wed Oct 02, 2013 12:10 am

After futher study it appears that the Linux kernel for my Wandboard is configured to use its serial port as a console. That can be handy, but now I'd like to disable this behavior after the system has booted up so I can use /dev/ttymxc0 to communicate with other serial devices.

Any idea how to do that?

Thanks,

Jaap
jwinius
 
Posts: 6
Joined: Mon Sep 30, 2013 12:56 pm

Re: Configurating the serial port

Postby Tapani » Wed Oct 02, 2013 4:07 am

Try taking out the lines
Code: Select all
   uart_clk = clk_get_sys("imx-uart.0", NULL);
   early_console_setup(UART1_BASE_ADDR, uart_clk);

from wand_init_timer() in arch/arm/mach-mx6/board-wand.c
and either de-select CONFIG_SERIAL_IMX_CONSOLE, or do not pass console=ttymxc0 in kernel bootargs.

Disclaimer: I have never tried to disable the debug console, so this is just going with my guess on what to do.
Tapani
 
Posts: 712
Joined: Tue Aug 27, 2013 8:32 am

Re: Configurating the serial port

Postby yogeshj » Thu Oct 03, 2013 6:51 am

How can you disable console, without re-compiling the kernel..?
yogeshj
 
Posts: 3
Joined: Thu Oct 03, 2013 6:49 am

Re: Configurating the serial port

Postby Tapani » Thu Oct 03, 2013 9:20 am

yogeshj wrote:How can you disable console, without re-compiling the kernel..?

Not sure that you can.
Try not passing the console parameter in u-boot.
Tapani
 
Posts: 712
Joined: Tue Aug 27, 2013 8:32 am

Re: Configurating the serial port

Postby yogeshj » Thu Oct 03, 2013 6:22 pm

Tapani wrote:
yogeshj wrote:How can you disable console, without re-compiling the kernel..?

Not sure that you can.
Try not passing the console parameter in u-boot.

New to embedded world, please be more detailed as how to remove the parameter from u-boot.
yogeshj
 
Posts: 3
Joined: Thu Oct 03, 2013 6:49 am

Re: Configurating the serial port

Postby Tapani » Fri Oct 04, 2013 4:27 am

yogeshj wrote:New to embedded world, please be more detailed as how to remove the parameter from u-boot.


You need to use the debug console...
Stop the u-boot boot process by pressing a key.
do a
Code: Select all
printenv

to display the u-boot environment.

There is a variable named 'bootargs' containing "console=ttymxc0" or similar.

Do a
Code: Select all
setenv bootargs 'args without console'
to take out the console.
Tapani
 
Posts: 712
Joined: Tue Aug 27, 2013 8:32 am

Re: Configurating the serial port

Postby Tapani » Fri Oct 04, 2013 4:30 am

It just occured to me that the debug console could also be compiled into u-boot...
Tapani
 
Posts: 712
Joined: Tue Aug 27, 2013 8:32 am

Re: Configurating the serial port

Postby jwinius » Sat Oct 05, 2013 2:25 am

Since I also felt that the console display was originally configured in u-boot, I went back to by u-boot source directory and modified ./include/configs/wandboard.h. In this I changed:

"mmcargs=setenv bootargs console=${console},${baudrate} " => "mmcargs=setenv bootargs "
and
"netargs=setenv bootargs console=${console},${baudrate} " => "netargs=setenv bootargs "

Afterwards I recompiled u-boot and used dd to re-install it on the micro SD card. Using minicom, I could see that now only some u-boot information was shown as the system booted up, but no more Linux kernel information. Otherwise everything was fine. I suppose that represents progress, but in a test I was still not able to use /dev/ttymxc0 to communicate.

Any ideas on what to do next?

Thanks,

Jaap
jwinius
 
Posts: 6
Joined: Mon Sep 30, 2013 12:56 pm

Re: Configurating the serial port

Postby jwinius » Mon Oct 07, 2013 3:20 pm

Okay, I found out what was going on: the serial port has no hardware flow control (RTS/CTS). As soon as I disabled this on my client machine, then I could get into the Wandboard via its serial port with no problem at all.

The issue affects both the Ubuntu image for the Wandboard Solo, available from this site, and the Debian setup that I'm using, the HowTo for which can be found at http://eewiki.net/display/linuxonarm/Wandboard.

Is this simply because somebody forgot to enable hardware flow control in the Linux kernel configuration for the Wandboard, or because of a bug, or because the Wandboard simply does not support this feature?

Thanks,

Jaap
jwinius
 
Posts: 6
Joined: Mon Sep 30, 2013 12:56 pm

Next

Return to Software - General

Who is online

Users browsing this forum: Google [Bot] and 5 guests