F0103 brd-5¶
Rule: Every peripheral signal sits on a pin that can carry it.
| Code | F0103 (stable, never reused) |
| Id | brd-5 |
| Category | brd |
| Source | spirit_level |
| Fix | by hand |
Level per tier¶
| Tier | Level | Reason |
|---|---|---|
| small | off | |
| small-workspace | off | |
| medium | off | |
| big | off | |
| ai | off | |
| embedded | deny |
a signal on a pin that cannot carry it never reaches the peripheral |
| ui | off | |
| egui | off | |
| units-strict | off | |
| units-paranoid | off |
Why¶
A peripheral signal reaches only the pins whose alternate functions carry it. A signal described on another pin never reaches the peripheral: CAN that never sees a frame, a ULPI PHY that never answers.
Example¶
[periph.can2]
instance = "FDCAN2"
pins = { RX = "PA0", TX = "PA1" } # brd-5: FDCAN2 TX is not on PA1; pins that carry it: PB1 (AF9)
How to fix¶
Move the signal to one of the pins the help lists (each with its alternate function, only those of the board's package), or correct the signal's name.
How it is checked¶
Against the chip's stm32-data JSON, like brd-4; without it the lint does not run.
Configure¶
Allow one finding in the code with // spirit-level: allow(brd-5) <reason> (waivers); the code works there too, as in [lints.F0103].