I use UART5 for RS485 communication, the device (Colibri i.mx6) can receive data but send fail. Here is my modified in device tree:
arch/arm/boot/dts/imx6qdl-colibri.dtsi
May I know which Linux Image version is flashed on the module ?
The default UART active state being logic low the RTS will be low during data tx. To control the RS485 transceiver DE pin with the UART default logic one need to have a inverted logic in h/w, have a look at the Colibri Evaluation board schematics. If to have inverted logic in s/w one will need to configure the UART port accordingly via IOCTLs. Have a look at serial-rs485 documentation.
The Linux Image Version is Colibri_iMX6_LinuxImageV2.6. I get the Linux kernel branch toradex_imx_3.14.52_1.1.0_ga from build-u-boot-and-linux-kernel-from-source-code and rebuild it. The UART5(UARTE) isn’t be configured in device tree in default and It need to be configured as above.
I try to configure the UART port by IOCTLs but it still can’t send data.
If I set the RTS pin (CSI0_DAT18) low by configuring it to be output pin, the RS485 port can send data normally. I don’t it any wrong in the pin configuration:
**Thanks for your suggest. I try to change the pin definition you mentioned above in the device tree and change the pin CSI0_DAT19 to be RTS (output) in my h/w. But the problem still exists. **