cancel
Showing results for 
Search instead for 
Did you mean: 

How to run USB DFU bootloader from HSE oscillator ? (need bypass )

Peter L.
Associate II

Hi,

I have a project that was design to be easily upgradable by the customer during devellopement. For this we added a USB connector and a jumper to select boot mode at power on, so we can use DFuSe to boot the new image. On the dev board (STM32F3discovery) everything is working even with craptastic wiring. However on the final board, it is not working. The USB is not recognized by windows.

The circuitry on the USB lines matches exactly the dev board but the oscillator has changed. On the discovery it is a 8MHz crystal and on my final board it is an external oscillator at 24MHz. Meaning we use the bypass in our application instead of a normal oscillator configuration. This was unfortunately changed during layout.

Is there any way the USB DFU bootloader can work with this external one pin oscillator ? Any tricks I could use to get it working or just impossible... I know it is needed to set the bypass in the application code but does the bootloader take this into account ... ?

Thanks a lot.

Misc data : STM32F303C, 24MHz ext osc ASV-24.000MHZ-EJ-T connected on OSC_IN

0693W000005AAgqQAG.png0693W000005AAgDQAW.png 

Refs :

* AN2606 - Application note - STM32 microcontroller system memory boot mode

* Dfuse : https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-stm32080.html#resource

13 REPLIES 13

Hi @Peter L. ,

I know this is an old thread, but I wonder, were you able to get the DFU bootloader to work with the external oscillator?

Thanks,

JW

Hi @waclawek.jan,

My company had a similar issue when working with STM32MP1 series. 

Regarding STM32MP153 advanced Arm<Sup>®</Sup>-based 32-bit MPUs - Reference manual point 10.4.2 HSE Oscillator.

PSPabloGS_0-1709811787592.png

Our hypothesis was that ROM Code failed to configure HSE Bypass because a 1K Ohm impedance was required to be connected to Vdd or GND in PH1-OSC_OUT pin.

PSPabloGS_2-1709812004026.png

This information is also specified in Getting started with STM32MP151, STM32MP153 and STM32MP157 line hardware development - Application note point 6.1.1

PSPabloGS_3-1709812174481.png

There is another key point. It may be mandatory to give the processor the capability to turn on/off HSE clock.

At point 10.1.1 of the same document (related to clock configuration)

PSPabloGS_4-1709812409425.png

I hope this information can save you some quality time.

Regards,

Pablo

Hi @PS-PabloGS ,

Thanks for these snippets of information. I'm not sure how, yet, but they certainly form part of the puzzle, too.

JW

Thanks PS-PabloGS. We had the same problem but on the L151. If it helps anyone else, on the STM32L151 if using an external oscillator (HSE in bypass mode) the bootloader doesn't seem to handle this so you need a pulldown resistor (1k?) or pulldown cap (20pF?) on PH1 OSC_OUT. I think the L151 bootloader uses HSE in analog mode, expecting to see a crystal on both pins, so adding the pulldown on OSC_OUT should allow it to use an external oscillator only connected to OSC_IN without bypass enabled and it should detect the correct frequency.