Updating the bootloader on Duet 3 expansion and tool boards
Duet 3 expansion boards and tool boards have a bootstrap loader written to the start of flash so that they can load firmware from the main board via CAN. This bootloader may occasionally need to be updated in order to support new features. Here are two ways of doing so.
Updating the bootloader via CAN
- Ensure that you have a stable power supply providing power to the Duet 3 main board and to the expansion board or tool board. If the power fails during the update process, the bootloader may be only partially written, in which case it will need to be updated using the second method. If you are updating the bootloader in-situ in a 3D printer, ensure that all motors are turned off using M18, and all fans and heaters are turned off. That will maximum the reserve power in the event of a power cut.
[This function is not implemented yet]
Updating the bootloader using an Atmel ICE
- Atmel ICE with firmware version 1.29 or later (check in "Tool Information" tab on Device programming in Atmel Studio 7)
- Adapter cable to connect the ICE to the 6-pin JST ZH connector on the expansion board or tool board
- Windows PC running Atmel Studio 7
- Disconnect the CAN connector from the target board. [This is to prevent the old bootloader loading new firmware, which will immediately protect the old bootloader again.]
- Connect the Atmel ICE to the 6-pin connector on the target board, and to the PC via USB
- Power up the target board
- Load Atmel Studio on the PC
- Select Tools->Device Programming
- Select the ICE tool
- Select MCU type ATSAME51N19A for an expansion board. or ATSAMC21G18A for a tool board
- Press the Read button next to the Device Signature box and check that it reads the ID
- Select Memories
- Press the Erase Now button next to Erase Chip. [This erases the main firmware, but not the bootloader]
- Select Fuses
- Find USER_WORD_0.NVMCRTL_BOOTPROT and set it to 0kbytes.
- Press Program to update the fuses.
- Select Memories
- Browse to the correct bootloader file for the target board, then press program.
- Make sure the it reports verification succeeded.