Skip to content

NAME-4 UART: suggest X_TX_Y_RX style names

Severity Status Implementation
suggestion runs in better_erc easy, depends on netlist (NET-12 for pins named by port only

Data it needs: graph.

Looks at. UART pins (by name or NET-12), net names.

What it catches. UART nets named TX and RX, or UART1_TX, without saying whose TX it is.

Why it matters. "TX" is ambiguous: the net from the MCU's TX to the modem's RX can be called TX from one side and RX from the other. Half of all swapped UARTs start there (DBG-11). Naming the net by both ends, MCU_TX_GPS_RX, makes a crossed wire visible in the name itself: MCU_TX_GPS_TX reads wrong.

Example. A sheet with GPS_TX and GPS_RX labels: on the MCU sheet GPS_TX lands on the MCU's TX pin (the designer meant "transmit to the GPS"), on the GPS sheet on the GPS's TX pin (the other designer meant "the GPS's TX"). Both outputs drive one net.

How to check. Nets that join UART TX or RX pins and whose name contains TX or RX without naming both ends; cross-check that a net named ..._TX_..._RX joins exactly one TX and one RX pin.

Fix. Name UART nets by driver and receiver (MCU_TX_GPS_RX, GPS_TX_MCU_RX).

References. SparkFun serial ("Rules and wiring"); catalogue MUX-1, DBG-11.

Test schematics

Each schematic below is in test_schematics/sources. The block under it is what berc check --only NAME-4 reports on it.

name-4_uart_names

The test schematic name-4_uart_names The test schematic name-4_uart_names

  suggestion NAME-4 #kr1    /DBG_TX_MCU_RX is named by a driver and a receiver but joins U1.6 (UART3_RX), U4.2 (RXD): two RXs on one line
                            net /DBG_TX_MCU_RX, pin U1.6, pin U4.2
                            fix: name UART nets by driver and receiver (`MCU_TX_GPS_RX`, `GPS_TX_MCU_RX`): a crossed wire reads wrong
  suggestion NAME-4 #ee7    /GPS_RX joins U1.2 (UART1_RX), U2.1 (TXD) and names one end only: whose RX is it?
                            net /GPS_RX, pin U1.2, pin U2.1
                            fix: name UART nets by driver and receiver (`MCU_TX_GPS_RX`, `GPS_TX_MCU_RX`): a crossed wire reads wrong
  suggestion NAME-4 #me5    /GPS_TX joins U1.1 (UART1_TX), U2.2 (RXD) and names one end only: whose TX is it?
                            net /GPS_TX, pin U1.1, pin U2.2
                            fix: name UART nets by driver and receiver (`MCU_TX_GPS_RX`, `GPS_TX_MCU_RX`): a crossed wire reads wrong
  suggestion NAME-4 #7t2    /MCU_TX_DBG_RX is named by a driver and a receiver but joins U1.5 (UART3_TX), U4.1 (TXD): two TXs on one line
                            net /MCU_TX_DBG_RX, pin U1.5, pin U4.1
                            fix: name UART nets by driver and receiver (`MCU_TX_GPS_RX`, `GPS_TX_MCU_RX`): a crossed wire reads wrong

NAME-4 also fires on the test schematics of other checks: bom-4_resistor_arrays, dbg-11_uart_spi_resistors, dbg-14_uart_console, mux-1_swapped_signals, test-5_bring_up_test_points, wire-1_single_pin_nets.