cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F070CBT6 will not enumerate on USB in bootloader mode

liampwll
Associate III

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

 

23 REPLIES 23

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

liampwll
Associate III

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.

waclawek.jan
Super User

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

JW

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

waclawek.jan
Super User

Yes, but that might be a different, unrelated issue.

Are any hints in errata or AN2606?

JW

 

liampwll
Associate III

We use USART on the same pins on the STM32F070F6P6 with the same USB-USART adaptor on a practically identical board, which is what makes me suspect that the bootloader is just broken in general on this specific revision or package.

Hi @waclawek.jan @liampwll 

It is mentioned that bootloader over USB can be used only with HSE external clock (4MHz, 6MHz..)

FBL_0-1753954561330.png

I had seen a similar issue on F070, and workaround adopted was to insert a FS hub.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


Hi @FBL ,

Both these issues are interesting and rise further questions... 

JW

 

waclawek.jan
Super User

This may be the root cause of problems both with USB and UART (with no external oscillator).

waclawekjan_0-1753963952024.png

The same issue is there for 'F042. That it works may be a coincidence, as exact effect of HSITRIM is process-dependent, (complicated by the fact that HSITRIM is added to the factory-set HSICAL, and their combined effect will be some 5-10% off nominal, I guess) and varies from piece to piece.

There may be no sane solution(*) for the USB case. For UART case, you can try a couple of baudrates around (below) the nominal, if you have such control over the PC-end of software.

Given the 'F0 family is more than 10 years old at this point, unless you present $M++ purchasing power (in which case you are not likely to ask here), I highly doubt ST will ever fix this.

JW

 

(*) Oh, and the insane one would be a contraption with one upstream (device) and one downstream (host) USB port (e.g. an STM32F4 with one USB module as device and other as host), where the downstream (host) would be capable of running the USB at frequencies adequate to the incorrectly detected HSE, e.g. 18MHz instead of 16MHz; attempting to "relay" the DFU protocol. This may be complete impossible due to latencies, and also USB modules/PHYs may not be willing to run at the different baudrate.

I can't explain why would a hub mentioned by @FBL help.

 

I did see that, but it doesn't explain the USART also not working. (Edit: See next reply)

I suspect the F042 uses clock recovery as it supports USB without an oscillator in the bootloader, but I haven't dumped the ROM to check.