kernel version: 4.14.98
soc: imx8mm
We want to test the rs-485 and rs-232 functions on imx8mm, so we wrote a test program to send data and receive data with the PC
Because the official bsp does not support rs-485 function
We have added ioctl to enable rs-485 function
There are occasional errors in sending data before.
Refer to this link https://patchwork.kernel.org/patch/9799829/ It is normal to turn off the DMA function.
But this link is dead(The person who wrote this patch is from NXP )
We have now found that there is a problem of packet loss when testing data between each other through the test program
If the DMA is turned on, rs-232 is normal, but the rs-485 test will be stuck
Can you give us advice or there is a correct patch to enable rs-485 in kernel 4.14.98 for us to refer to
Attached is our rewritten driver and test program
Hi Charles
one can look at boundary devices nitrogen8mm linux releases where rs485 is used:
https://boundarydevices.com/yocto-release-for-i-mx-8mm/
or variscite boards:
https://variwiki.com/index.php?title=DART-MX8M_UART#Configuring_RS485_Half-Duplex
Best regards
igor