shibosoftwaredev/f1c100s-linux-nema8-stepper-controller

Restores component part numbers and CAD models, removes test-point 3D bodies, and validates that solder paste exists only on top-side SMT pads without altering copper or DRC.

Version
0.3.5
License
unset
Stars
0

firmware/PROTOCOL.md

# Linux-to-motion-MCU protocol

UART0 runs at 115200 baud, 8 data bits, no parity and one stop bit. Multi-byte
values are little-endian.

Each frame is:

| Bytes | Field |
|---:|---|
| 2 | sync: `A5 5A` |
| 1 | version: `01` |
| 1 | sequence number |
| 1 | command |
| 2 | payload length |
| N | payload |
| 2 | CRC-16/CCITT-FALSE over version through payload |

Responses repeat the request sequence and set bit 7 of the command. Their first
payload byte is status: 0 success, 1 bad command, 2 bad argument, 3 not armed,
4 busy, 5 fault and 6 over-temperature.

| Command | Payload | Meaning |
|---:|---|---|
| `01` | none | heartbeat |
| `02` | `u8 armed` | arm/disarm; arming is rejected with any fault |
| `10` | `i32 microsteps, u32 rate` | queued relative move |
| `11` | none | controlled stop |
| `12` | none | immediate disable |
| `20` | none | status request |

The MCU must default to disabled, enable its independent watchdog, require a
valid heartbeat at least every 100 ms, and disable the bridge after 250 ms
without a valid frame. CRC, framing, UART overrun, DRV8825 nFAULT, TMP102 alert
and over-temperature errors must never leave the bridge enabled.

The Linux utility implements this framing. The MCU firmware is deliberately a
separate safety deliverable and must be reviewed and tested on first articles;
the PCB repository does not claim that an unprogrammed STM32 can move a motor.