Skip to main content
Visitor II
July 17, 2025
Question

STM32F070CBT6 will not enumerate on USB in bootloader mode

  • July 17, 2025
  • 17 replies
  • 1109 views

We have a STM32070CBT6 with minimal connections (schematic below) and it appears to be unresponsive to USB enumeration, although it does pull DP low to trigger it. This occurs when hotplugging it or holding reset low for a few seconds. I've checked the input on PF0 and it is getting a clean 16 MHz.

liampwll_0-1752735336736.png

 

    This topic has been closed for replies.

    17 replies

    Super User
    July 17, 2025

    On the host side do you see enumeration error or nothing at all? Borrow a hardware USB analyzer.

     

    liampwllAuthor
    Visitor II
    July 17, 2025
    [ 3969.049330] usb 1-1.1: new full-speed USB device number 91 using xhci_hcd
    [ 3969.049669] usb 1-1.1: Device not responding to setup address.
    [ 3969.253544] usb 1-1.1: Device not responding to setup address.
    [ 3969.457301] usb 1-1.1: device not accepting address 91, error -71
    [ 3969.457668] usb 1-1.1: WARN: invalid context state for evaluate context command.
    [ 3969.457853] usb 1-1-port1: unable to enumerate USB device

    With a scope I see the pull down and then the setup packets going through every address from the host but no response from the STM32.

    liampwllAuthor
    Visitor II
    July 17, 2025

    You can decode the packet if you like, but I've tried on multiple machines so I doubt this is a USB driver issue. None of the packets are longer than this so I assume they're all setup packets.

    20250717_154805.jpg

    liampwllAuthor
    Visitor II
    July 17, 2025

    I've also tried another board without an oscillator installed. In this case the pull-down does not occur, so it is not the case that it's just not detecting the oscillator. The MCU is certainly reaching the USB configuration step but then it is just not responding to USB setup packets.

    For the sake of completeness I also installed the oscillator on that board, in which case it behaves just like the first one.

    Technical Moderator
    July 17, 2025

    Hi @liampwll 

    Would you insert a USB hub?

    liampwllAuthor
    Visitor II
    July 17, 2025

    I tried with a short cable going to a USB port with a hub close by. I should also note that we have practically the exact same board with a STM32F070F6P6 and USB works fine on there. I can not test if the bootloader USB works on that board as the F6 does not switch the shared pins to USB mode.

    liampwllAuthor
    Visitor II
    July 18, 2025

    I've also soldered a UART adaptor that is known to work on our F6 variant to pins PA9 and PA10, the same ones we use for programming our F6 variant. In this case when the BOOT0 jumper is installed PA9 is pulled high as you'd expect but the device does not respond to USART messages. I've tried this with the oscillator installed and removed. I'm led to question if the bootloader on this particular model is actually functional at all.

    liampwllAuthor
    Visitor II
    July 18, 2025

    Here are the package markings for reference as some searching of this forum shows that many others have reported the same issue and some have also reported that it was fixed by different revisions.

    20250718_231239.jpg

    Technical Moderator
    July 29, 2025

    Hi @liampwll 

    Do you have the same issue when using Open Bootloader DFU or DFU in IAP mode?

    The problem here might be caused by the crystal, it is highly recommended to use lower external crystal value below or equal to 8MHz. The lower the value is, the better the precision of the crystal computation and larger error margin. 

    liampwllAuthor
    Visitor II
    July 29, 2025

    I don't have a way to get Open Bootloader on there so I can't say for sure. However as already mentioned, USART also does not work using the exact same USART interface that we use for a nearly identical board with the F6 variant, this is both with and without an oscillator present.

    I can dig up an ST-LINK and see if I can get more details of what's going on if this isn't a known issue. We also are getting some F042's to swap in which are pin compatible for the peripherals we're using.

    Here are the other reports I found here for reference. some have more reports in the replies:

    https://community.st.com/t5/stm32-mcus-embedded-software/nucleo-f070rb-bootloader-not-responding/td-p/317566

    https://community.st.com/t5/stm32-mcus-embedded-software/start-usart-bootloader-on-stm32f070-device-does-not-work/td-p/466273

    https://community.st.com/t5/stm32-mcus-products/stm32f070-bootloader-on-nucleo-board-won-t-start/td-p/412989

    liampwllAuthor
    Visitor II
    July 31, 2025

    We've replaced the STM32F070CBT6 with a STM32F042C6T6 on the boards, specifically we have replaced just the MCU on the boards that were not working, and it now works fine so this strongly suggests that the bootloader is completely broken.

    Super User
    July 31, 2025

    I'm not sure the bootloader works with external oscillator.

    JW

    liampwllAuthor
    Visitor II
    July 31, 2025

    That's why I also tried USART with the oscillator removed, which also didn't work aside from setting the pull-ups.