IMX8MN UART1 can not receive data

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

IMX8MN UART1 can not receive data

跳至解决方案
1,268 次查看
link
Contributor III

Hi all:

        Now we use UART1 of IMX8MN to communicate with PC. The device can send data, but cannot receive data. The correct waveform can be measured at the RX end of the device. It is OK to send and receive data in the same program on UART2.

      To confirm the question, use imx8mnevk as a comparison. we run unit_tests to text /dev/ttymxc0.
Snipaste_2021-11-02_19-38-41.bmp
For mxc_uart_test.out:
write and read data are OK

---- Running < ./mxc_uart_test.out > test ----

/dev/ttymxc0 opened
Attributes set
Test: IOCTL Set
Data Written= Test
Data Read back= Test

----  Test < /dev/ttymxc0 > ended  ----



For mxc_uart_stress_test.out
write data is OK, but tne receive data is empty.

clipboard.png

What may the cause? Does UART1 need additional software configuration for serial port

Thanks!

标签 (1)
0 项奖励
回复
1 解答
1,248 次查看
link
Contributor III

 

			uart1: serial@30860000 {
				compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
				reg = <0x30860000 0x10000>;
				interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&clk IMX8MN_CLK_UART1_ROOT>,
					 <&clk IMX8MN_CLK_UART1_ROOT>;
				clock-names = "ipg", "per";
				dmas = <&sdma1 22 4 0>, <&sdma1 23 4 0>;
				dma-names = "rx", "tx";
				status = "disabled";
			};

 

 

sdma.bin is not integrated in rootFS.UART1 depends on SDMA. So the UART1 function is abnormal

 

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,249 次查看
link
Contributor III

 

			uart1: serial@30860000 {
				compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
				reg = <0x30860000 0x10000>;
				interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&clk IMX8MN_CLK_UART1_ROOT>,
					 <&clk IMX8MN_CLK_UART1_ROOT>;
				clock-names = "ipg", "per";
				dmas = <&sdma1 22 4 0>, <&sdma1 23 4 0>;
				dma-names = "rx", "tx";
				status = "disabled";
			};

 

 

sdma.bin is not integrated in rootFS.UART1 depends on SDMA. So the UART1 function is abnormal

 

0 项奖励
回复
1,258 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Yanlin

 

may be recommended to check if signal present on uart1 pad with oscilloscope,

for software check if IOMUXC_UART1_RX_SELECT_INPUT configured properly, it is described in

sect.8.2.5.261 Select Input Register (IOMUXC_UART1_RX_SELECT_INPUT)

i.MX 8M Nano Applications Processor Reference Manual

 

Best regards
igor

0 项奖励
回复