# Is it the code or the board? ARGYNIX split-test checklist

ARGYNIX Skills (worldskills.blog), lesson "Digital faults: is it the code or the board?".
Our own checklist. Work down it in order and write each answer.

## 1. The symptom, exactly

What should happen, what happens, and when (always, after a while, only when warm,
only after a button press). Write it before you change anything.

## 2. Power and clock first

- [ ] Supply pin of the chip at its voltage, measured at the pin, not at the connector.
- [ ] GND shared between every board on the bus.
- [ ] Reset pin HIGH (not held in reset).
- [ ] A blink at a known rate (for example 1 Hz, timed on a scope) proves the clock and
      the program run.

## 3. Split it

| Test | Result | So the fault is |
|---|---|---|
| A known-good test program on my board (blink, loopback, I2C scan) | works / fails | fails: the board or wiring |
| My program on a known-good board | works / fails | fails: my program |
| UART: TX joined to RX (loopback), type a few characters | echoed / not | not: the port, adapter or wiring |
| I2C: scan finds the device at its 7-bit address | found / not | not: power, wiring, pull-ups, address pin |

## 4. Bus checks

- [ ] UART: both ends at the same baud rate and frame (8N1). Baud error of each end
      worked out. TX crossed to RX. Logic levels match (5 V into a 3.3 V input needs a divider
      or a level shifter).
- [ ] I2C: SDA and SCL idle HIGH. Pull-ups present (measure each line to the supply, power
      off). Address in the form your library wants (ST's HAL: the 7-bit address shifted
      left by one, 0x68 becomes 0xD0). Rise time measured from 30 % to 70 % of the supply.
- [ ] SPI: mode (CPOL, CPHA) as the datasheet says. CS goes LOW for each transfer.
      MISO not driven by two devices.

## 5. Look at the wire

- [ ] Logic analyser at 4 to 10 times the fastest signal (UART 115200: at least 1 MS/s;
      I2C 400 kHz: at least 4 MS/s), with the protocol decoder on.
- [ ] The bytes on the wire match what the code meant to send.

## 6. Record

| Symptom | Split test | Evidence | Cause | Action | Result |
|---|---|---|---|---|---|
| | | | | | |
