MQX task hangs on Vybrid UART0_C4 register read

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

MQX task hangs on Vybrid UART0_C4 register read

ソリューションへジャンプ
1,042件の閲覧回数
gordonsmith
Contributor II

I am using MQX 4.0.2 on M4 core of Vybrid SOM with Linux running on A5 core.

I modified mqx/examples/hello to write to "ttya:".

In DS-5 debugger, when fopen( ttya:, default mode) call gets to _kuart_change_baudrate() and I step over C4 register read, nothing more happens. C4 read is:

    sci_ptr->C4 &= (~ UART_C4_BRFA_MASK);

I verified read problem by first running:

    uint8_t c4 = sci_ptr->C4;

sci_ptr value is 0x40047000, which looks right. I don't know what happened to the task, I'm new to MQX and DS-5.

Does anyone know what I can look at to troubleshoot this?

user_config.h

#define BSPCFG_ENABLE_TTYA       1

#define BSPCFG_ENABLE_ITTYA      0

hello.c

char const * const deviceSci0 = "ttya:";

hndSCI0 = fopen( deviceSci0, BSP_DEFAULT_IO_OPEN_MODE );

0 件の賞賛
返信
1 解決策
852件の閲覧回数
gordonsmith
Contributor II

The problem was Linux was starting uart0 clock regardless of device tree settings. I removed the clock start in arch/arm/mach-imx/clk-vf610.c and MQX could then use "ttya".

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
853件の閲覧回数
gordonsmith
Contributor II

The problem was Linux was starting uart0 clock regardless of device tree settings. I removed the clock start in arch/arm/mach-imx/clk-vf610.c and MQX could then use "ttya".

0 件の賞賛
返信
852件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Gordon,

Just FYI that there is MQX_4.1.1 and MQX_4.2.0 updates available which might have solution.

For your MQX_4.0.2 have you verified that the A5/Linux is not using the UART0 (I'm assuming it is running)?

I recall a post long ago that mentioned if both cores accessing same peripheral that bad things might happen.

Regards,

David

852件の閲覧回数
gordonsmith
Contributor II

Other PTB10/11 devices such as DCU display are also not defined in Linux. The PTB10/11 IO MUX can be seen in the debugger to be configured for SCI0 TX/RX.

0 件の賞賛
返信
852件の閲覧回数
gordonsmith
Contributor II

MQX 4.1.1 is currently incompatible with the Linux we are using. I will double check that I have the 4.0.2 patches applied.

The Linux device tree does not have UART0 device defined and the running Linux OS does not create a UART0 device.

0 件の賞賛
返信