I’m under the impression that the half-duplex and inverting support of the H7 in the Cube Orange should allow for a straight connection to FrSky SPort on a receiver (in this case an R-XSR). However, I’ve been having some issues.
Without half-duplex set in SERIALx_OPTIONS, the line behaves correctly; when the receiver releases the line, it stays at 0V. However, with the half-duplex bit set, when the line is released it gets pulled to 3.3V. When connected to the receiver, this means the line ends up at around 2.25V, likely due to a pull down in the receiver.
If I add an external resistor to ground, the telemetry is able to work, but the signal doesn’t look great; only reaching 2V when the FCU has the line. Conversely, when the S-XSR has the line, the signal looks fine.When the line is released by both ends, the voltage (with my external additional pull down) is approximately 0.4V.
This is through the mini carrier board, which, as far as I can tell, just has straight through connections from TELEM2 to a TSX0108 level level shifter inside the cube. This is tied to 3.3V both sides and seems to just be there to protect the FMU chip. I’m unsure if the state of the FMU ouput causes the level shifter to drive the line, though it seems likely given the behaviour is as expected without the half-duplex mode.
The ST reference manual is rather brief on the expected pin setup for the half-duplex mode just saying:
…the I/O must be configured so that TX is configured as alternate function open-drain with an external pull-up. (p2227, Sec 51.5.15)
This is seen on master. I have tried a few variations on pull down settings in libraries/AP_HAL_ChibiOS/UARTDriver.cpp:1385 but none seemed to make any difference.
Does anyone have any insight on the internals of the UART drivers that might explain things?