We are trying to utilize UART2 to communicate with a DJI Flight Controller (FC) without success. We use an Auvidea J120 board (configured for UART usage without MCU) and the corresponding patch available at https://auvidea.com/firmware/. As far as we know, UART2 corresponds to /dev/ttyTHS1 which are thus used. The FC UART operates at 3v3 just like the J120 UART2.
UART2 works well on loop back when testing with screen by displaying the typed characters:
screen /dev/ttyTHS1 230400
When connecting to the FC the communication fails.
The devices /dev/ttyTHS1 through /dev/ttyTHS3 exists.
This is our first time using a Jetson device so any suggestions or pointers to what might be our problem are really appreciated.
For speeds above 115200 you should use two stop bits. In the case of loopback for 230400 I suspect the signal is so good and so well timed (and the fact that you are only typing in a terminal instead of using full bandwidth) that it isn’t an issue to use the default single stop bit. Try with two stop bits and make sure you use a quality twisted pair cable (preferably with shielding…ethernet cable is a good option).
Regarding the speed, I have tested with 115200 and 38400 with the same result.
Unfortunately I do not have the option to change the serial configuration on the FC.
I will try to find a better cable.
Do consider, if possible, first testing at 115200. Then, with the better cable, and assuming 115200 works, increment clock speed until you either get the speed you are looking for, or instead noting when it fails with a single stop bit.
The results at 115200 are the same with the original cable: No connection.
I changed the cable and got it working with a short (10 cm) non-shielded, non-twisted cable. I also tried with a 20 cm ethernet cable without any luck.
I guess we might need an external driver.
For now, we have settled on using an FTDI cable due to better functionality.