Skip to content

SER-20 RS-232 levels straight into MCU pins

Severity Status Implementation
error planned mid, depends on NET-7, NET-10

Looks at. Connector class, signal path to the MCU.

What it catches. An RS-232 connector (DE-9, a terminal block marked RS-232) whose TXD/RXD pins reach MCU pins through nothing but resistors, with no RS-232 transceiver.

Why it matters. RS-232 uses inverted levels of ±5 V to ±15 V (receivers must take ±25 V). Into an MCU pin the negative half forward-biases its ESD diode to ground and the positive half to the rail, latch-up and damaged pins follow, and the logic is inverted anyway: a TTL UART reads RS-232 idle (negative) as a continuous break.

Example. A "debug UART on the DE-9" of an industrial board, wired to the STM32's USART2 with a 1 kΩ in series: it works with a 3.3 V USB-TTL cable and burns PA3 the day someone plugs in a real PC serial port. A MAX3232 (3 to 5.5 V, two drivers and receivers, receiver input resistance specified over ±3 V to ±25 V) is the usual cure.

How to check. A connector of DE-9 class (or one the project marks as RS-232, CFG-2) whose pins reach MCU IO pins through passives only (NET-10).

Fix. An RS-232 transceiver (MAX3232 class) between connector and MCU; or rename the connector "TTL UART" and use a connector type that a PC serial cable does not fit.

References. MAX3232 §6.6 (driver output), §6.7 (receiver input resistance, ±25 V); TIA-232-F; Wikipedia, RS-232 "Voltage levels".