Uart3's Rx pin is not working with imx8 Nano evk board

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

Uart3's Rx pin is not working with imx8 Nano evk board

1,717件の閲覧回数
shilesh_babu
Contributor II

Dear NXP,

I am using uart3 for a serial communication, for testing i am connecting serial-usb converter to send some data from my laptop to Nano board uart for debugging propose only.

from the evk board side i am sending this data 

$echo "testing" >> /dev/ttymxc2 

and on the laptop side receiving this 

$cat /dev/ttyUSB2

$testing

from laptop side  

$echo "testing" >>  /dev/ttyUSB2  

and on the evk board side receiving nothing............. 

$cat /dev/ttymxc2

so it means only Tx pin is working on the evk board side, Rx is not working.

Even if i check in uart loop-back, nothing is showing on evk terminal, is this can be the kernel issue.

$uname -a

5.4.24-2.1.0+gbabac008e5cf #1 SMP PREEMPT Mon Jul 27 19:49:53 UTC 2020 aarch64 aarch64 aarch64 GNU/Linu

Best Regards,

S Babu

ラベル(1)
タグ(2)
0 件の賞賛
返信
3 返答(返信)

1,656件の閲覧回数
weidong_sun
NXP TechSupport
NXP TechSupport

Hello shilesh,

Below is from device tree in L5.4.24_2.1.0:

...

        pinctrl_uart3: uart3grp {
            fsl,pins = <
                MX8MN_IOMUXC_ECSPI1_SCLK_UART3_DCE_RX        0x140
                MX8MN_IOMUXC_ECSPI1_MOSI_UART3_DCE_TX        0x140
                MX8MN_IOMUXC_ECSPI1_SS0_UART3_DCE_RTS_B        0x140
                MX8MN_IOMUXC_ECSPI1_MISO_UART3_DCE_CTS_B    0x140
            >;
        };

....

It means that you will used ECSPI1_SCLK pin and ECSPI1_MOSI pin to connect PC via UART to USB bridge.

Connections like below:

ECSPI1_SCLK(DCE_RX)------->TX of UART_TO_USB BRIDGE---->PC USB

ECSPI1_MOSI(DCE_TX)------->RX of UART_TO_USB BRIDGE---->PC USB

BUT you should pay attention to UART3 node in device tree:  RTS_B & CTS_B are supported, which means communications via UART3 will use Hardware Flow Control.

......

&uart3 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart3>;
    assigned-clocks = <&clk IMX8MN_CLK_UART3>;
    assigned-clock-parents = <&clk IMX8MN_SYS_PLL1_80M>;
    fsl,uart-has-rtscts;
    status = "okay";
};

......

So if you want to used it , you have 2 ways like below:

(1) Disabling RTS & CTS

Remove the line from above node:

 /*fsl,uart-has-rtscts;*/

(2) Using Hardware Flow Control for your test

In DCE mode:

RTS_B is input:  it should be connected to CTS_B of UART_TO_USB BRIDGE.

CTS_B is output: it should be connected to RTS_B of UART_TO_USB BRIDGE.

Hope above information is helpful to you!

Have a nice day!

B.R,

Weidong

1,656件の閲覧回数
shilesh_babu
Contributor II

Hi Wigros Sun, 

thanks for your support, but after doing all these changes facing the same issue uart rx pin is not working.....

My device tree configuration for uart3 is 

&uart3 {

        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_uart3>;
        /assigned-clocks = <&clk IMX8MN_CLK_UART3>;
        assigned-clock-parents = <&clk IMX8MN_SYS_PLL1_80M>;
        /* fsl,uart-has-rtscts; */ //commented this line
        status = "okay";
};

 what can be the issue ??

0 件の賞賛
返信

1,656件の閲覧回数
weidong_sun
NXP TechSupport
NXP TechSupport

Hello shilesh,

You can also test it with loopback.
1. Pin7 & Pin11 are connected together.
2. Pin 8 & Pin10 are connected togeter.
3. Writing a simple app with hardware flow control function.

J1003 on i.MX8MN-EVK board is interface for Raspberry Pi Module B+ , UART3 has been tested.

pastedImage_1.png

Have  a nice day!

B.R,

Weidong

0 件の賞賛
返信