cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 default DFU mode verus Standalone

uwe2
Associate II
Posted on August 05, 2015 at 17:25

We used the DFUSE over USB successfully with several L152 designs. The L152 chips don t have a USB boot loader DFU like described in the AN2606 STM32 microcontroller system memory boot mode. (DFU SE via USB) So we download the slightly modified standalone DFU USB loader and everything works perfect with the L152 chips. We hoped to save this work with the L476 chips, cause there the DFU loader is already preprogrammed from factory.

I thought on the L476 devices the DFU over USB is preprogrammed from factory and all we have to do is to have a 32kHz Xtal and have the BOOT0 pin connected to ground (pattern 7). But this doesn t work like expected.

I also found on the Cube, that there is a DFUSE standalone project, which exactly does, what we want.

Can anybody explain, why there is this DFUSE standalone project, if ST already have preprogrammed this code directly at factory ?

Is the factory preprogrammed code more sensitive to 100% correct USB power settings or should it also work with 3.0 Volts ? Further explanation about the intentions of the 2 different DFU loaders would be highly appreciated.

#l476-dfu-factory-preprogrammed-?
29 REPLIES 29
Posted on August 05, 2015 at 18:56

Not very familiar with the L476, but all other STM32 families needed BOOT0 pulled HIGH to get into System Loader mode, and present a DFU device at reset.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
uwe2
Associate II
Posted on August 05, 2015 at 19:48

Thanks for the Vdd Info. I changed from GND to Vdd but still no DFU operation over USB.

Posted on August 05, 2015 at 19:59

I guess you could look at how big the ROM is on the part, I'd expect something supporting USB/DFU would be around 20KB, rather than 2KB

0x1FFF0000..0x1FFF6FFF and 0x1FFF8000..0x1FFFEFFF here I think.

Using the USB OTG FS port. Probably needs an 8 MHz HSE, but don't see that explicitly stated in the manual(s) right now.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on August 05, 2015 at 20:05

http://www.st.com/web/en/resource/technical/document/application_note/CD00264379.pdf

needs a refresh, will poke the moderator. Currently Rev 4 Apr 2014
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
uwe2
Associate II
Posted on August 05, 2015 at 21:24

AN2606 page165 shows, that even 32kHz LSE operation should work. Tomorrow I try to bringup the standalone DFU SE and maybe this gives enlightning info.....

jiayuan
Associate II
Posted on August 07, 2015 at 19:09

Hello, I'm facing the same issue, connected both USB port, drive Boot0 high and hit reset doesn't help. Which board did you use and which standalone project did you try out? Thanks!

uwe2
Associate II
Posted on August 10, 2015 at 09:18

I understand now, my initial question. The default DFU loader is used, when you simply want to program your CPU. The standalone project allows to add f.e. serial flash with speech data and this can also be updated via DFU.

The status here is, that the factory preprogrammed DFU  loader works perfect with external HSE crystal. As soon as we try the same with the 32 kHz crystal, it will not work. I am not sure if this is due to the fact that we have the LSE not already running and then do the first DFU USB connect. The next thing I will try, is have the 32 kHz LSE running in power down mode and then connect the USB for DFU upload. Maybe it is a timing problem, cause the 32768 Hz oscillator starts and is used at the first startup to fine tune the 48 MHz USB clock. Maybe also the startup time is too long ? Ensure you have read the AN2867.

uwe2
Associate II
Posted on August 10, 2015 at 09:26

I forgot to mention, that the standalone project is from the STM32L4 cube example code.

It is under blabla/l476veal/ application/ usb_device / dfu_standalone.

We will use this for programming our SPI flash over DFU. Very nice feature of ST DFU loader.

uwe2
Associate II
Posted on August 10, 2015 at 14:03

We use our own PCB board. It has a 64 Pin LQFP on it, so we can verify L0, versus L1 verus L4 power consumption things.

For the problem we have a L476 chip and a FC135 32678 Hz XTAL