cancel
Showing results for 
Search instead for 
Did you mean: 

Flashing QSPI using DFU mode in stm32cubeprogrammer

sanjeev majumdar
Associate III

Hi,

i have a custom board based on stm32f769. We are updating the firmware for the same on field using DFU over USB interface. Recently we have added QSPI external flash to store data and graphical assets and we are able to flash the binary using stm32cubeprogrammer over stlink with the help of external loader.

Now we want to support the similar programming method using DFU over USB. Kindly tell us how we can do the same? can we add support for flashing external QSPI flash in any DFU enabled utility / stm32cubeprogrammer or any other way except JTAG/ debugger.

6 REPLIES 6
Michael K
Senior III

Hi, were you ever successful in flashing a QSPI memory with USB DFU?

Honestly this seems within the realms of doable..

You'd need all the target-side support in the DFU code.

I'd lean more to the MicroSD card delivery method, or a CDC-XMODEM

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

In the past few hours I've been doing a bit more digging and it doesn't seem like the ST provided bootloader supports external flash writing. I'm now investigating the implementation of a custom bootloader. For anyone else stuck on this, Mastering STM32 chapter 22 talks about the boot process and has walkthrough of writing a simple custom bootloader. AN2606 discusses the built-in bootloader. Your micro ref guide should have a chapter on the boot process too - for 769 its RM0410 section 2.5.

Good luck to all

Well the ROM boot loader has no idea what hardware and pins you'll use. It is designed for a more tightly constrained region of known functionality.

What you'd do with it is create a staged-loader, where you push in board specific code into RAM, and run that.

For your custom hardware configuration you'd need to own the loader side, and hope that the PC side code will just blindly push the .DFU sections into the prescribed locations.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sanjeev majumdar
Associate III

HI in existing bootloader DFU mode doesnt support flashing QSPI. I created a custom bootloader which listens on USB port (CDC mode) and flashes the FW in QSPI using respective QSPI driver of the flash. bootloader & application memory map are like this FYR:

bootloader code & IVT -> 0x0800_0000 - 0x0800_FFFF (sector 0 - 1)

app code -> 0x0801_0000 - 0x081F_FFFF (sector 2 - 11)

hope this helps.

Thanks. That's similar to the solution in the book. Glad it worked out for you! Light at the end of the tunnel.