cancel
Showing results for 
Search instead for 
Did you mean: 

How to boot from external flash using quadSPI.

Mani.V
Associate II

I want to use external flash as boot memory because the size of internal flash is not enough for my controller. what i was thinking is to write code in external NOR flash and give address as starting address for boot in flash.ld file but then i found that its not that possible to directly access the flash as initialization needed for QUADSPI to communicate with external flash. Hence i need your help to implement boot loader program where i initialize the quadSPI only and rest application code will execute from desired external flash address. Please help me out how to do this.

6 REPLIES 6
Mani.V
Associate II

Please help me here, as i tried many things but always stuck no where. waiting for any response

You'd need a small amount of code in the internal flash to bring up the pins and interface, and then jump into the code on the external​ flash.

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

I tried that thing but somehow i found stuck in no where, as when i debug it skips those lines where i tried to jump over another location.

May be i am missing something . If possible please share some link where i can debug steps what i am missing

Mani.V
Associate II

Hi, as i did some search over the same, and i found reference code given by ST for Xip which is execute in place. Which is similar to my requirement. But when i tried that code it executes only once and then i need to re program it to execute again. I made some changes in application code where by default ST made controller reset after 20 times of LED blink in every 200 ms, i changed to from that to toggle LED every sec for lifetime. But it only executes one time and when i reset it, it ain't work again until and unless i re programmed it. any suggestions over that ?

No idea what parts are involved here, or any of the design specifics.

I​nternal and External Flash devices should hold content indefinity. Do you have the content checksummed in some fashion? Can you report such failure or identify what bytes get corrupted.

On the STM32 make sure you pull BOOT0 low on your board.

Have a Hard Fault Handler and Error Handler​ that output actionable data, that way you might have more insight into what is failing.

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

Well, i don't think so i got you all but the thing i understood is you want to me find the failure and what causing that failure right? if yes then i would like to say that i did tried that and in last i found that there is no hardfault error nor any error handing issue. but its more like when it resets, it unable to find the address to start and got into something random(unknown) location. from where it won't come back.