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.
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.
What may the cause? Does UART1 need additional software configuration for serial port
Thanks!
已解决! 转到解答。
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
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
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