cancel
Showing results for 
Search instead for 
Did you mean: 

USB DFU on STM32L496

EKirs
Associate II

Hello,

I am trying to enable USB DFU functionality on a custom board with STM32L496 MCU.

Only D+ and D- pins are routed from the USB connector to the MCU, ID is not routed at all and VBUS is only to power the board.

I added a code in my firmware that jumps to bootloader (after checking pin with a user switch before any peripheral initialization) using the code from here:

https://stm32f4-discovery.net/2017/04/tutorial-jump-system-memory-software-stm32/

It looks like the jump is correct, I follow step-by-step in the debugger and see that it jumps to the correct location and executes some code (from ROM). However, when I allow it run straight after, I can see that it jumps back eventually to my firmware code (does reset?). As the result, my device is not seen by Windows 10.

I suspect, the failure might be in the VBUS signal not routed to the PA9 pin. Howerver, VBUS is not a requirement for bus-powered devices, so the question is to the bootloader: does it need this pin? Also, is ID pin required?

So, what are the hardware requirements to enable USB DFU functionality?

Also to mention, my custom board does not have HSE oscillator (running only from internal HSI). However, this particular chip also has HSI48 oscillator with some Clock Recovery System for use specifically with USB and SDMMC. Is this oscillator with the CRS system being used correctly by the USB bootloader?

The USB cable I am using is confirmed to work with other devices, so no problem here.

Thank you for any help.

0 REPLIES 0