cancel
Showing results for 
Search instead for 
Did you mean: 

Executing main() by XIP with W25Q32 QSPI Flash

Farbod
Associate

Hi

I'm using STM32H750VBT6 with W25Q32 QSPI external flash memory from Winbond and I'm using Keil Microvision IDE with ARM_CC Compiler.

I'm trying to execute my whole project from the QSPI flash directly (which is called XIP). I know that I have to configure QuadSPI peripheral properly before executing code from the memory mapped QSPI flash and I'm doing it in SystemInit() function, so I have to map the SystemInit or system_stm32h7xx.c file to the default internal flash address and change the main() address to the QSPI flash (which is 0x90000000 in my case).

The problem is, how I can change the main() base address and execute it from the QSPI flash after configuring QuadSPI in SystemInit().

And what should I do with VTOR? Do I have to leave it with the default value?

Regards

Farbod

1 ACCEPTED SOLUTION

Accepted Solutions
gbm
Lead III

What you are trying to do doesn't seem to be a good idea - you will get slow and non-deterministic interrupt response.

I you have to do it, treat it as two distinct programs in two separate projects: the bootloader in internal Flash, initializing QSPI access and jumping to the application in QSPI. Search the forum for posts on bootloader - you will see many interesting remarks. You will need to set VTOR in the bootloader (recommended) or in the app.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

View solution in original post

2 REPLIES 2
gbm
Lead III

What you are trying to do doesn't seem to be a good idea - you will get slow and non-deterministic interrupt response.

I you have to do it, treat it as two distinct programs in two separate projects: the bootloader in internal Flash, initializing QSPI access and jumping to the application in QSPI. Search the forum for posts on bootloader - you will see many interesting remarks. You will need to set VTOR in the bootloader (recommended) or in the app.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

Thanks a lot:thumbs_up: