Electronic – Unable to find COM for STM32

bootloaderpcbprogrammingststm32

I developed a PCB for a project using STM32WB55 and after getting it manufactured I am trying to connect it to the computer using a Micro USB cable in order to run the code on it.

However, when I connect it to the PC I cannot see the COM port for it. It seemly doesn't detect the COM port. All I can see is the DFU in FS Mode under Universal Serial Bus which I am not that sure what it is or how to make use of it. ( see picture below. Sorry for it being in French)
enter image description here

I want to run the code on the PCB by using the bootloader, however in order to do that in to use the STM32Cube IDE tool, I need to see the COM port.

What do you think I should do?

I have tried using th STM32Cube Prog but I am not too sure how to use it and I have all my codes in STM32CubeIDE. Is there a way to code using the STM32CubeIDE using bootloader?

Best Answer

The STM32 factory ROM bootloader USB mode is not a virtual serial device. Rather it is a DFU device, so it would not show as a "COM port". Instead it implements a "Device Firmware Update" protocol for receiving uploads from suitable STM32 DFU software you could select to run on your PC.

You would only get a virtual serial device appearing via the STM32's USB port if you load some firmware of your own which implements a virtual serial device.

If you want to use the UART mode of the bootloader, you'd need some additional USB to UART device between your computer and the board, and appropriate drivers for that.

Generally for development though you should be using an SWD adapter to load and debug code. If you do not have one already, consider purchasing an ST-LINK or see if whatever Nucleo or similar eval board you did previous work with has the capability to program external targets.

Having serial message output is of course also very useful when developing firmware; in theory there are ways to tunnel it through SWD but bringing out a signal to connect and external USB UART and capture that is generally simpler to work with.

The mechanism you use to write and compile your software is entirely independent from the mechanism you use to inject the resulting flat binary image or hex file contents into the chip - the one exception would be that programs which expect to co-exist with a custom bootloader in flash (vs the factory one in ROM) would need to be linked to an address after that taken by the custom bootloader.