You need an additional chip to translate between the RS-232 signals and the TTL-level UART signals.
Most people find the MAX3232 to be a suitable chip (it also needs a small amount of other components.)
Another alternative is to get a USB RS-232 adapter and talk to the external RS-232 device that way.
I don’t know how to use additional chip to translate between the RS-232 signals and the TTL-level UART signals.
Is there any existing device?
If yes,could you send me some information about the device,e.g.picture,document?
FYI, the serial UART interfaces on the Jetson are 3.3V (“TTL”) level, not the general RS232 levels. You’ll see USB serial UARTS listed in shops that sell them with a listing of what voltage they support. The 6-pin adapters (such as the one I mentioned from digikey) are wired to match J17. You can use them on any header by matching its TX to board RX, its GND to board GND, its CTS to its RTS, its RTS to its CTS. CTS/RTS are not needed if software flow control is used. Here is some info on the J21 connector (but beware on a TX2 hardware flow control via CTS/RTS does not work):
J17 is just a standard layout, but otherwise the same as the J21 connector if you rearrange pins.
I’m confused by this. The nvidia documentation (ex: TX2 module datasheet and customer pinmux) seems to say that the voltage level for UART pins are all 1.8 V. Wouldn’t a level shifter be required to use a 3.3 V interface?
The schematic shows a level shifter for J17 (the pin header,) whereas J21 (the camera connector) is at 1.8V.
I’m running J17 at 3.3V, and it works great so far.
(Also, it seems the stock camera doesn’t actually use the UART, as I’ve seen no interference with the signals and my protocol.)
Thanks for the help! I hadn’t seen that. One more clarification: I could be wrong because I haven’t really gotten a handle on all the numbering, but do you have the J numbers backwards? I’m looking at page 66 of the OEM Product Design Guide, which shows a level shifter attached to UART0/UART1 (?), which I think is the UART on the J21 GPIO header.
Also, I thought using J17 required removal of the camera, but you’re saying I don’t need to?
EDIT: apparently filtering your search to only hardware->schematics removes their schematic files from the results… I found them now. For posterity’s sake, I believe the descriptions were backwards (J21 is the GPIO pin header).
Thanks again for your help, snarky!
J21 is wired for serial console (it would take effort to change to something else because even U-Boot is by default using this for serial console). There are of course many functions to different pins on J21 which are unrelated to the serial UART. This is “/dev/ttyS0”.
J17 also connects to the camera module, though I don’t think it is used by default…it tends to work fine without much effort. You could remove the camera module if you want to guarantee it isn’t touching J17 (it just uses two phillips screws…make sure power is off and you’ve drained any caps, e.g., by holding the power button down for several seconds after the power connector is removed). This is “/dev/ttyTHS2”.
The “ttyS#” are standard serial UART drivers, the “ttyTHS#” entries actually have a DMA-capable driver behind the scenes. Both work mostly the same way although there will be some IOCTL calls which differ if you are programming at a low level.
As an example you could wire J17’s RX and TX pins together, and then use a serial terminal running at 115200 8N1 with software (no) flow control and the terminal would echo to itself.