Skip to main content
Visitor II
January 6, 2025
Solved

Reset, USB-device "BOOTLOADER" shows up, but CubeProgrammer does not see it

  • January 6, 2025
  • 2 replies
  • 2233 views

I've "developed" a ridiculously simple test program using STM32CubeIDE, for BlackPill STM32F411CE :
on board LED blinks at 0,5 Hz.  Downloaded via ST-link plugged into USB. 
Browsing through Memory shows the downloaded code (Segment .text) matching the linker log file, all fine.

Disconnect the ST-Link wires from board and plugging in a USB3 Cable into the up to now unused onboard USB port. Holding down boot0 button while tapping the RST button fires up STM ROM bootloader, which correctly senses a plugged in USB cable and presents the board as USB device 0483/df11, complete with text "STM32 BOOTLOADER",  again all well, one would think.

However, firing up CubeProgrammer mode "USB" and clicking rescan button "no DFU detected" shows.
Clocksetup ist 96MHz main clock and 48MHz USB clock(?) with the onboard external 25.000MHz crystal.

Even after configuring the (in my program unused) USB as USB_OTG_FS device in "device only" mode, same result.  Configuring the (unused) USB_OTG_FS device in "OTG/Dual_Role" mode,  same result.


Do I need to configure USB in my program at all to make it work for the bootloader,
even if my programm doesn't use USB? 
(I'd guess: no, the bootloader does all the setup himself, and my program doesn't even run when in STM bootloader)

 

What am I missing?

 

On a further note, what are the various USB modes for? 
What mode to setup if one wants to send out characters via BlackPill's onboard USB port to a virtual USB-serial "COMx:" device in Windows?

 

    This topic has been closed for replies.
    Best answer by PRenn.1

    Nope. That was the bootloader USB device, no idea why CubeProgrammer does not recognize it.

    But I've found a solution to the USB_CDC Device not showing up:   the heap was too small !

    I changed it from 0x0200 to 0x2000 and voila, the device shows up, gets configured by Windows and on COM6:
    I can watch my Hello World messages appear!

    => one needs to look at SRM32F411CEUX_RAM.ld   there the heap gets defined as _Min_Heap_Size

    Only drawback I see is that this file is a genuien STM file for my MCU so tampering with it does feel like a hack.
    I'd rather right-click that projekt and define those vaules as "per project default-overrides" and not change basic chip definition files.

    2 replies

    Graduate II
    January 6, 2025

    Is Windows loading a driver for "STM32 BOOTLOADER" ?

    To pretend to be a Serial port you'd want to be a CDC Device

    PRenn.1AuthorAnswer
    Visitor II
    January 6, 2025

    Nope. That was the bootloader USB device, no idea why CubeProgrammer does not recognize it.

    But I've found a solution to the USB_CDC Device not showing up:   the heap was too small !

    I changed it from 0x0200 to 0x2000 and voila, the device shows up, gets configured by Windows and on COM6:
    I can watch my Hello World messages appear!

    => one needs to look at SRM32F411CEUX_RAM.ld   there the heap gets defined as _Min_Heap_Size

    Only drawback I see is that this file is a genuien STM file for my MCU so tampering with it does feel like a hack.
    I'd rather right-click that projekt and define those vaules as "per project default-overrides" and not change basic chip definition files.

    Super User
    January 6, 2025

    @PRenn.1 wrote:

     no idea why CubeProgrammer does not recognize it.


    Being a Black Pill, it's (probably) not a genuine STM32 ?

    Technical Moderator
    January 6, 2025

    Hi @PRenn.1 

     

    Since it is a Blackpill device, we cannot provide further support for this issue as it is a fake product.