Use switched debug console port, the OS is hung.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Use switched debug console port, the OS is hung.

Jump to solution
3,155 Views
charleshuang
Senior Contributor II

The default debug console is ttymxc0.

Modify console port to ttymxc1 in bootargs_base variable of uboot environmental configure, as follow:

setenv bootargs_base 'setenv bootargs console=ttymxc1,115200 enable_wait_mode=off video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24'

The OS is hung after “cat /dev/ttymxc0”.

Could I switch the debug console port without modifying these code, as follow.

In uboot:

1. #define CONFIG_UART_BASE_ADDR   UART1_BASE_ADDR

2. static void setup_uart(void)

{

  /* UART1 TXD */

  mxc_iomux_v3_setup_pad(MX6Q_PAD_CSI0_DAT10__UART1_TXD);

  /* UART1 RXD */

  mxc_iomux_v3_setup_pad(MX6Q_PAD_CSI0_DAT11__UART1_RXD);

}

In Kernel:

3. uart_clk = clk_get_sys("imx-uart.0", NULL);

4. early_console_setup(UART1_BASE_ADDR, uart_clk);

Labels (2)
1 Solution
2,562 Views
justin_jiang
NXP Employee
NXP Employee

Base on my knowledge. The number of console is related to your HW UART port and kernel load sequency.

So the code midification is needed. It can't be changed just by the u-boot parameters.

View solution in original post

13 Replies
2,562 Views
YixingKong
Senior Contributor IV

Charles

This discussion is closed since no activity. If you still need help, please feel free to reply with an update to this discussion, or create another discussion.

Thanks,

Yixing

0 Kudos
Reply
2,562 Views
YixingKong
Senior Contributor IV

Charles

Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.

Thanks,

Yixing

0 Kudos
Reply
2,562 Views
charleshuang
Senior Contributor II

If it is necessary to modifying the code, what is variable "console=" used for?

It has decided the used UART port in the begin of u-boot and kernel

It seems redundant about passing "console=" to kernel

0 Kudos
Reply
2,562 Views
YixingKong
Senior Contributor IV

Charles

Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.

Thanks,

Yixing

0 Kudos
Reply
2,562 Views
charleshuang
Senior Contributor II

I don't think my question get really solved.

The solution Linda supplied is work, but it still need to modify code

I'd like to know if I could switch console(uart) via the setting of the variable "console=" without modifying any code.

I tried it before, I set "console=ttymxc1", but the OS is hung after“cat /dev/ttymxc0”.

So, I think ttymxc0 driver is not relly released while the setting is "console=ttymxc1"

0 Kudos
Reply
2,563 Views
justin_jiang
NXP Employee
NXP Employee

Base on my knowledge. The number of console is related to your HW UART port and kernel load sequency.

So the code midification is needed. It can't be changed just by the u-boot parameters.

2,562 Views
YixingKong
Senior Contributor IV

Charles

I will ask one of Freescale AE to help you.

Thanks,

Yixing

0 Kudos
Reply
2,562 Views
YixingKong
Senior Contributor IV

JiangJustin, could you please help this customer?

Thanks,

Yixing

0 Kudos
Reply
2,562 Views
charleshuang
Senior Contributor II

Hi, Jimmy

So, not only uboot environment variables need to be adjusted, but also some codes for debug console port switch should be modified , is it right?

0 Kudos
Reply
2,562 Views
charleshuang
Senior Contributor II

Why can I not switch consoles by uboot environment variables?

I think consoles would be reinitialized in the kernel.

Do you have any idea about this?

0 Kudos
Reply
2,562 Views
xiaoqianlin
NXP Employee
NXP Employee

Please refer to the attached on how to customize UART port.

Regards, Linda

Linda Lin
0 Kudos
Reply
2,562 Views
jimmychan
NXP TechSupport
NXP TechSupport

right.

0 Kudos
Reply
2,562 Views
jimmychan
NXP TechSupport
NXP TechSupport

ttymxc0 is UART1

ttymxc1 is UART2

0 Kudos
Reply