Skip to content

MUX-2 MCUs with SVD/pin data: check the alternate function actually supports the mode used

Severity Status Implementation
error planned mid, depends on NET-12, IMP-9

Looks at. Alternate-function tables of the part.

What it catches. A signal routed to a pin that cannot carry it: SPI SCK on a pin with no SCK function, a UART RX on a TX-only pin, a timer channel on a pin without that timer, two signals of one peripheral instance on pins of different instances.

Why it matters. The schematic symbol of an MCU shows a few names per pin; the full alternate-function table is in the datasheet. A wrong pin is found when the firmware is written, and the fix is a board revision or bit-banging. SVD files describe registers, not pins, so the pin data has to come from the datasheet or a generated database (stm32-data for STM32, the function tables for RP2350).

Example. B200A rev A routes the SD card clock to RP2350 GPIO4, which is SPI0 RX, not SCK, and its D0-D3 to GPIO2, 3, 7, 6, which are not consecutive: SPI mode needs PIO or bit-banging, and PIO 4-bit SDIO needs consecutive data pins. Rework 5 and rev B move CK to GPIO2, CMD to GPIO3 and D0-D3 to GPIO4-7 (B200 rev B change list).

How to check. Load the part's alternate-function table (NET-12 from stm32-data, IMP-9 from a pinmux sheet), infer each pin's intended function from the net name or the project's pin map, and check that the pin offers it and that the signals of one interface share one instance.

Fix. Move the signal to a pin with the function; for PIO-style controllers, check the pin-order constraints too.

References. stm32-data; CMSIS-SVD; RP2350 datasheet GPIO function table; B200A hardware reference §11.