--- title: "NUCLEO-U3C5ZI-Q" description: >- The [NUCLEO-U3C5ZI-Q](https://www.st.com/en/evaluation-tools/nucleo-u3c5zi-q.html) board is automated for Trusted Firmware-M (TF-M) testing. It's a Cortex-M33 board built around the STM32U3C5ZI with an on-board STLINK-V3EC; power, SWD flashing and the serial console all run over that single ST-LINK USB connection, so no MIB and no board modification are required. --- ```{include} common-alert-enablement.md ``` The [NUCLEO-U3C5ZI-Q](https://www.st.com/en/evaluation-tools/nucleo-u3c5zi-q.html) board is automated for Trusted Firmware-M (TF-M) testing. It's a Cortex-M33 board built around the STM32U3C5ZI with an on-board STLINK-V3EC; power, SWD flashing and the serial console all run over that single ST-LINK USB connection, so no MIB and no board modification are required. This document applies to the following boards: - NUCLEO-U3C5ZI-Q: nucleo-u3c5zi-q ## Components The following components are required to automate the board: - One USB cable from an LAA USB port to the board's on-board STLINK-V3EC connector. This single link carries power, SWD flashing and the UART console. ## Board modifications None. The board is flashed over SWD through the on-board ST-LINK, so there isn't boot-mode switch to change and no flying leads to solder. ## Connections Connect the board's STLINK-V3EC USB connector to **USB port 2** on the LAA (`laacli usb 2`). That port powers the board and exposes both the SWD debug interface (used for flashing and reset) and the ST-LINK Virtual COM Port (the DUT console). The console is served over telnet on port **2020**. ## Software The device type extends the generic `base-stm-mcu` template from LAVA. Flashing and reset are done by `stm32_tfm_flasher`, shared by all the STM32 MCU boards and shipped in the LAA overlay (`appliance/firmwares/stm-mcu`) alongside a Segger-stripped STM32CubeProgrammer tarball. baklaweb provisions the overlay into `/usr/local/` on the dispatcher, and the device dictionary calls the wrapper directly, with no container: the dispatcher is already privileged and has USB access. The wrapper: - extracts the bundled CubeProgrammer into a cache directory on first use, - detects the ST-LINK serial number, since there is a single board per appliance (set `BOARD_SN` to force a specific probe), - on `--flash`, unpacks the TF-M build tarball and runs its `TFM_UPDATE.sh` (and `regression.sh` when present) to flash the secure and insecure images over SWD, retrying up to three times, and - on `--reset`, resets the board with `STM32_Programmer_CLI -c port=SWD mode=HOTPLUG -rst`. A software reset keeps the ST-LINK VCP enumerated, so the console doesn't miss the first seconds of boot output, as a USB power-cycle would. The deploy step powers the board on (`laacli usb 2 on`), waits for the ST-LINK to enumerate, then flashes. Power off and power on toggle LAA USB port 2. See the [STM32WBA65I-DK1](stm32wba65i-dk1.md#stm32cubeprogrammer-licensing) page for the STM32CubeProgrammer licensing notes, which apply to the same bundled tarball. ## Health check The health check flashes a small TF-M image and waits for `nucleo_u3c5zi_q is OK` on the console.