I use the UART6 in RS485 mode for Modbus communication, but the CTS pin is not controlled by the kernel but by the libmodbus library. This works fine with Jethro and the kernel 3.14.38. I have ported our system to Rocko and the kernel 4.14.171 and now I have the following error:
My application polls values from 2 devices via Modbus, but my application does not receive an answer.
I have connected the board to an oscilloscope and looked at the signals of the RX and TX line, the result is shown in figure 1 (RX = blue, TX = yellow). The RX level is LOW by default. Additionally you can see that a response is sent, but the kernel does not seem to process the response correctly because of the level.
If I add another device to the Modbus interface which has a certain terminal resistor, the RX level is HIGH by default (figure 2). Thereupon the kernel process the signal and my application receive an answer.
The behavior of the RX level is identical to the 3.14 kernel but the kernel seems to be able to process both RX-LOW and RX-HIGH levels. Is there a patch for the 4.14 kernel, or can the kernel be configured so that the new kernel has the same behavior regarding RX level?
(1) About 4.14.171
We didn't release the version of BSP, for 4.14.x, Typically, 4.14.98_2.0.0 / 4.14.98_2.2.0.
(2) The 2 links on RS485 can help you
Have a nice day!