NanoVNA-H* – a howto do firmware update using STM32CubeProgrammer

One of the many solutions for updating firmware on the NanoVNA-H* is using ST’s STM32CubeProgrammer.

It would seem that STM32CubeProgrammer deprecates the older DfuSe Demo utility… which remains available for download. Some online experts have inferred that the word Demo in the latter implies it is not the full quid… but they misunderstand the context.

Windows drivers

The two are kind of incompatible in that they use difference device drivers. If you set your machine up for one, it breaks the other until you switch the correct driver in.

STM32CubeProgrammer uses libusbk (or the like) whereas DfuSe Demo uses the STub30 driver.

Above is a dump of the driver properties in my working instance.

Above, a dump from Device Manager.

Entering the bootloader

The MCU used for NanoVNA-H* has a bootloader in silicon, it is not possible to overwrite the bootloader. The bootloader is enabled by the BOOT0 pin (see nanoVNA-H – recovery), either by connecting a wire, or in later NanoVNA-H* hardware, by holding the jog switch in whilst powering on, or from the menu for later versions of some firmware.

File format

At this time, STM32CubeProgrammer does not open .dfu files (that might change in time), you need a bin or hex. If your favorite NanoVNA-H* firmware distribution does not have such a file, you need to make one.

Let’s take an example using a bin file. The bin file does not contain the offset in memory for writing the file, so you need to know that (unless the utility infers it from the chip type it discovers). In this case, the offset is 0x8000000.

Above is a screenshot of STM32CubeProgrammer showing where you check / specify the offset address at which to load the file.

Above is a screenshot after loading the file to the chip. The log window is scrollable, and shows the bin file being written starting at offset 0x8000000.

This is a howto but should not be taken as a recommendation over other tools. If you want to use STM32CubeProgrammer for whatever reason, this is how to do it.

This information applies to the NanoVNA-H* as published at this date. It may not apply to other variants, eg NanoVNA-F uses a different method of firmware update.