2020-07-23 11:51 PM
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.
2021-01-12 11:12 AM
Hi, were you ever successful in flashing a QSPI memory with USB DFU?
2021-01-12 01:08 PM
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
2021-01-12 02:17 PM
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
2021-01-12 02:55 PM
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.
2021-01-12 08:26 PM
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.
2021-01-12 08:57 PM
Thanks. That's similar to the solution in the book. Glad it worked out for you! Light at the end of the tunnel.