Skip to content
Tercio FD

FD firmware

2 min readFirmware v2 · protocol v2

The Tercio FD updates over its own USB-C port through ST’s built-in USB bootloader. No probe needed. Source: Kerol-Dev/Tercio-fdcan.

With PlatformIO, from the Firmware folder:

Terminal window
pio run -e tercio_fd

The image is .pio/build/tercio_fd/firmware.bin.

  1. Put the adapter in update mode. In Tercio Control, open the adapter page and select Restart into update mode. From Python: bus.enter_adapter_bootloader(). The serial port disappears, and the adapter shows up as STM32 BOOTLOADER (USB 0483:df11).

  2. Flash the image:

    Terminal window
    dfu-util -a 0 -s 0x08000000:leave -D .pio/build/tercio_fd/firmware.bin

    :leave starts the new firmware straight away.

  3. Unplug and replug the adapter if it has not restarted by itself. Tercio Control shows the new version on the adapter page.

On Windows, dfu-util needs the WinUSB driver for the bootloader device (install it once with Zadig); STM32CubeProgrammer brings its own.

The adapter watches its own start-up. If the firmware fails to start three times in a row (resets before running for two seconds), it enters the USB bootloader by itself. Unplug and replug it up to three times, then flash again as above.

A board that has never run the Tercio firmware is flashed over SWD (J3, same pin order as the S1) with an ST-Link:

Terminal window
pio run -e tercio_fd -t upload

The CAN receive pin shares its pin with the chip’s BOOT0 input, which the idle bus holds high. The firmware makes the chip ignore that pin (it sets the option bytes nSWBOOT0 = 0, nBOOT0 = 1 and resets once). To set them beforehand:

Terminal window
STM32_Programmer_CLI -c port=SWD -ob nSWBOOT0=0 nBOOT0=1

The adapter page in Tercio Control shows Boot pin: Ignored, as it should be once this is done.