FD firmware
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:
pio run -e tercio_fdThe image is .pio/build/tercio_fd/firmware.bin.
Update over USB
Section titled “Update over USB”-
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 (USB0483:df11). -
Flash the image:
Terminal window dfu-util -a 0 -s 0x08000000:leave -D .pio/build/tercio_fd/firmware.bin:leavestarts the new firmware straight away.Choose USB, select the device, Connect, open
firmware.binat address0x08000000, Download, then Disconnect. -
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.
If an update goes wrong
Section titled “If an update goes wrong”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.
First flash of a new board
Section titled “First flash of a new board”A board that has never run the Tercio firmware is flashed over SWD (J3, same pin order as the S1) with an ST-Link:
pio run -e tercio_fd -t uploadThe 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:
STM32_Programmer_CLI -c port=SWD -ob nSWBOOT0=0 nBOOT0=1The adapter page in Tercio Control shows Boot pin: Ignored, as it should be once this is done.