There are 3 basic methods for loading firmware onto a Mote, each with their own pros & cons and place:

Updates over SWD

SWD is an ARM-specific debug interface that is natively supported by ARM processors like the STM32U5. It can be used for loading firmware, as well as a host of other in-circuit debug operations.

Best For

Pros

Cons

Hardware Required

  1. Mote and power source.

  2. An SWD debugger. We like the STLINK-V3MINIE, which is available [here] among other places.

Untitled

  1. SWD connector, there are 2 options:

    1. A Tag-Connect TC2030-CTX-NL-STDC14 for use with STM32 processors with STLINK-V3 /STLINK-V3MINI. Available [here].

    The downside to this option is you need to have access to the SWD pads on the Mote, and you need to manually hold the Tag-Connect spring pins in place. (See more details in process below).

    - OR -

    1. An SWD-over-USB-C adapter [here]. These are not yet commercially available as finished goods, but the hardware is open source and JLC PCB files are included in the project, so it’s fast and easy to order for < $10/piece from JLC at qty 5. Here’s a guide on how to do that: Ordering SWD-Over-USB-C Adapters.

    The benefit of this option is you only need to use the Mote’s USB connection, and you can flash firmware, debug over SWD, and make a serial connection all over the same physical interface.

Untitled

Untitled

Process

  1. Hardware setup:

    1. Tag-connect:

      1. Plug USB cable into Mote. (Make sure the Mote isn’t powered yet!)

        Untitled

      2. Plug USB cable into STLINK.

        Untitled

      3. Turn on Mote power.

      4. Manually hold the Tag-connect spring pins in place on the Mote while flashing. (Yep, it’s a bit awkward).

        Untitled

    2. SWD-over-USB-C:

      1. Plug USB cable into the STLINK.

        • LD1 on the STLINK should turn red.

          IMG_5459.JPG

      2. Plug the STLINK ribbon cable into the USB-C adapter board.

        • The ribbon cable connector should be centered on the header, and the cable should exit towards the ‘target’ side of the adapter board.

          IMG_5461.JPG

      3. Plug the Target side of the USB-C adapter board into the Mote.

        ⚠️ Note: the USB-C cable connected to Target must be capable of High-Speed Mode (e.g., it could be used for delivering video to a monitor).

      4. Plug the Source side of the USB-C adapter board into your computer.

        💡 The USB-C cable attached to your computer on the Source side **does not need to be a high-speed cable.

      5. Turn on the Mote power source.

        • The LED on the adapter board should turn green. If it does not turn green, flip the USB cable at the Mote over. Normally USB-C cables can be plugged in any orientation, but adding the SWD signals requires it is plugged in a specific way. There generally are not orientation markers on USB-C cables, so you’ll have to guess and check.

          IMG_5460.JPG

  2. Now from the build directory, enter make flash to compile and upload, or make debug to start the STLink In-Circuit Debugger interface.