2018-06-15 03:15 AM
Hi, I have read the AN4852 application note explaining how to program an external QSPI flash using the built-in UART bootloader. However it does not tell how to execute afterwards the code saved in the external flash on the microcontroller. Does the microcontroller somehow have to read the code and copy it into internal flash or how could it be done?
#external-flash #code #stm32f407 #execute Note: this post was migrated and contained many threaded conversations, some content may be missing.2018-06-25 09:05 AM
By 'auto-booting' I mean the STM32 jumps into ROM and takes the code from an external FLASH. The thing is that its bootloader just waits for commands received from UART and another device has to send the data to the STM32.
What do you mean by a 'loader in FLASH'?
2018-06-25 09:27 AM
>>What do you mean by a 'loader in FLASH'?
A loader taking 16KB of the F407 FLASH which manages the application and external FLASH, and provides a means of downloading and recovery
2018-06-25 09:53 AM
Ok, but what I'd like to do is jump into bootloader and download the code to flash from there, so I need to get somehow the code from the bootloader and not depend from an application in flash.
2018-06-25 10:24 AM
You can jump into the ROM loader, or use the BOOT pins and reset into it.
To get the ROM based loader to support random external devices on random pins, you're going to need to use the ROM loader to download a custom loader into RAM that supports your specific hardware configuration.
Pretty sure the F407 doesn't provide specific QSPI support, this was added to subsequent F4 parts (F446) and newer STM32 families (ie L4 or F7)
Expect code to run much slower from external memory.
At the end of the day you're going to have to run code in a way constrained/allowed for in the design of the micro-controller.