Use switched debug console port, the OS is hung.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Use switched debug console port, the OS is hung.

ソリューションへジャンプ
3,154件の閲覧回数
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);

ラベル(2)
1 解決策
2,561件の閲覧回数
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.

元の投稿で解決策を見る

13 返答(返信)
2,561件の閲覧回数
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 件の賞賛
返信
2,561件の閲覧回数
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 件の賞賛
返信
2,561件の閲覧回数
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 件の賞賛
返信
2,561件の閲覧回数
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 件の賞賛
返信
2,561件の閲覧回数
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 件の賞賛
返信
2,562件の閲覧回数
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,561件の閲覧回数
YixingKong
Senior Contributor IV

Charles

I will ask one of Freescale AE to help you.

Thanks,

Yixing

0 件の賞賛
返信
2,561件の閲覧回数
YixingKong
Senior Contributor IV

JiangJustin, could you please help this customer?

Thanks,

Yixing

0 件の賞賛
返信
2,561件の閲覧回数
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 件の賞賛
返信
2,561件の閲覧回数
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 件の賞賛
返信
2,561件の閲覧回数
xiaoqianlin
NXP Employee
NXP Employee

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

Regards, Linda

Linda Lin
0 件の賞賛
返信
2,561件の閲覧回数
jimmychan
NXP TechSupport
NXP TechSupport

right.

0 件の賞賛
返信
2,561件の閲覧回数
jimmychan
NXP TechSupport
NXP TechSupport

ttymxc0 is UART1

ttymxc1 is UART2

0 件の賞賛
返信