self_check
Validates STM32 debug links by reading CPUID and DBGMCU IDCODE, checking byte order, Cortex-M presence, and expected MCU family. Run first to catch endianness or config faults before debugging.
Instructions
Validates the link right after connecting: reads CPUID and DBGMCU IDCODE and checks byte order, that a real Cortex-M is present, and that the device matches the expected family (from the profile MCU or the 'expected_family' arg). Run this first to catch endianness/config faults before debugging. Halts the core first (identity reads are unreliable while running); pass halt=false to skip.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| halt | No | Halt the core before reading (default true). | |
| session | No | Optional debug-session name. Omit for the default target. | |
| expected_family | No | Expected MCU/family, e.g. 'STM32L431'. Defaults to the profile MCU. |