STM32 Virtual COM Port not detected after HID Bootloader uploaded on STM32F407G-DISC1

Bootloader for STM32F103 and STM32F4xx micro-controllers
No special driver is required. Support for Windows, Linux and Mac Operating System
Post Reply
HappySamuel
Posts: 1
Joined: Fri Jul 16, 2021 7:41 am

STM32 Virtual COM Port not detected after HID Bootloader uploaded on STM32F407G-DISC1

Post by HappySamuel »

Hi

I saw that HID bootloader has support STM32F407 board, therefore i bought a STM32F407G-DISC1 board. I am able to upload the HID bootloader onto the board via STM32CubeProgrammer successfully. However, the direct USB (known as STM32 Virtual COM Port) can neither be detected by Device Manager (Windows 10) nor Arduino IDE. Although, i can upload the code using HID bootloader in Arduino IDE successfully, but the STM32 Virtual COM Port still cannot be detected, so i can't use the Serial Monitor at all.

I tried to upload the code by using STM32CubeProgrammer(SWD) as upload method on Arduino IDE, STM32 Virtual COM Port can be detected by both Device Manager and Arduino IDE. But this makes me unable to have the Direct USB as programming USB and native USB at the same time, which is a nice feature of HID bootloader since STM32F103 on bluepill.

Is there any solution / guidance on this?

Best,
Samuel
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: STM32 Virtual COM Port not detected after HID Bootloader uploaded on STM32F407G-DISC1

Post by mrburnette »

Which of :https://github.com/search?q=STM32+HID+bootloader ???

You may also want to look deeper into the USB stack with:
https://docs.microsoft.com/en-us/window ... er/usbview
But this makes me unable to have the Direct USB as programming USB and native USB at the same time, which is a nice feature of HID bootloader since STM32F103 on bluepill.
I'm of the opinion that 3rd party tools (inc. many libs) cause more issues than they solve: P.I.T.A.
I tried to upload the code by using STM32CubeProgrammer(SWD) as upload method on Arduino IDE, STM32 Virtual COM Port can be detected by both Device Manager and Arduino IDE.
... appears the Windows driver is loading correctly.
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: STM32 Virtual COM Port not detected after HID Bootloader uploaded on STM32F407G-DISC1

Post by ag123 »

you need to do a usb reset - also called a 'single ended zero', to ask the host to enumerate the buses again.
https://www.usbmadesimple.co.uk/ums_3.htm

oh and i think stm32f407g has its own usb dfu boot loader, all it takes is to set boot0 and reset.
i think there may even be a way to trigger it by rebooting from your sketch
Rekog
Posts: 13
Joined: Mon Jun 28, 2021 6:10 pm

Re: STM32 Virtual COM Port not detected after HID Bootloader uploaded on STM32F407G-DISC1

Post by Rekog »

It's totally normal, STM32 USB device doesn't support both of those protocols, either one or other.

Untitled.png
Untitled.png (38.89 KiB) Viewed 7326 times
hobbya
Posts: 49
Joined: Thu Dec 19, 2019 3:27 pm
Answers: 1

Re: STM32 Virtual COM Port not detected after HID Bootloader uploaded on STM32F407G-DISC1

Post by hobbya »

Your board comes with STLink v2 which can provide a virtual com port. So you may have the following set up:
native USB of STM32F407 -- for flashing via embedded STM bootloader
USB of STLink -- for virtual com

However instead of using 2 USB ports you can actually use just the STLink since it supports both flashing via SWD and virtual com on a single USB.
Post Reply

Return to “STM32 HID bootloader”