Hello,
I am working on a IMX6 Solo X chip with Linux and using 3 UARTS (RS485) to send/receive data from the serial ports interfacing with another board. I'm simply testing these ports with a simple C program utilizing Linux libraries (termios, read, write) by sending and receiving simple messages (e.g. ABCDEFGHIJ).
I'm reading bytes from the external board fine, however, anytime i send bytes, the external board receives a large amount of 0x00 bytes that come after the bytes i sent.
What can I do to prevent these extra 0x00 bytes from being sent after my initial message? I preferably do not want to modify the external boards code to band aid this.
I have been reading some other posts and it seems like it might be the DMA, however, I also was reading the uarts have to have DMA enabled. Is this true or can i disable DMA?
An example device tree node for a uart is setup as such:
uart3: serial@021ec000 {
compatible = "fsl,imx6sx-uart",
"fsl,imx6q-uart", "fsl,imx21-uart";
reg = <0x021ec000 0x4000>;
interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6SX_CLK_UART_IPG>,
<&clks IMX6SX_CLK_UART_SERIAL>;
clock-names = "ipg", "per";
dmas = <&sdma 29 4 0>, <&sdma 30 4 0>;
dma-names = "rx", "tx";
status = "disabled";
};
pinctrl_uart3: uart3grp {
fsl,pins = <
MX6SX_PAD_NAND_DATA04__GPIO4_IO_8 0x1b0b1
MX6SX_PAD_NAND_DATA06__UART3_RX 0x1b0b1
MX6SX_PAD_NAND_DATA07__UART3_TX 0x1b0b1
>;
};
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
dma-names = "","tx";
status = "okay";
};
Thank you