Hi,
Is it possible to use multiple QSPI flash for the firmware storage?
The idea is to segment the flash for a bootloader and multiple "application".
During the bootloader session, user can choose which "application" they want to run.
Then there will be 2 QSPI flash connected to the RT1170. Flash A contain bootloader and Application 1 and 2. Flash B contain Application 3, 4 and 5. The bootloader can choose and jump to the application as chosen by user.
Is this possible? If so, how to connect the two QSPI flash to the RT? Should it be 2 flash connect to FlexSPI1 with different chip select or use FlexSPI1 and FlexSPI2 for each flash?
How will the flash memory map look like? And is there any modification on the code needed so the bootloader can see the entire memory?
Thanks in advance.
both below two ways are ok, and the 2nd way may be more efficiency
- way1: Connect 2 flash to FlexSPI1 with different chip select
- way2: Use FlexSPI1 and FlexSPI2 for 2 flash.
For memory map (FlexSPI1 - 0x3000_0000; FlexSPI2 - 0x6000_0000):
- way1: Flash1: 0x3000_0000 - 0x3000_0000 + flash1_size
Flash2: 0x3000_0000 + flash1_size - 0x3000_0000 + flash1_size + flash2_size
- way2: Flash1: 0x3000_0000 + flash1_size
Flash2: 0x6000_0000 + flash2_size
If you configures both FlexSPI1 and FlexSPI2, then bootloader can see the entire memory.
Hi @jay_heng,
Thank you for you reply.
Lets say the flash size is 0x10000. For way1, how to tell the MCU that it has to use CS2 when I access address 0x3001 0000 and above?
Let's say I use the most basic sample code for the 1170 EVK, how to modify it to support way1 or way2? (which file need to change, or which part of the settings need to change?)
If you configure FlexSPI->FLSHA1CR0[FLSHSZ] to the size 0x10000, then flash device connected to A_SS0 will be mapped into 0x3000_0000 - 0x3000_FFFF.
then If you configure FlexSPI->FLSHA2CR0[FLSHSZ] to the size 0x10000, then flash device connected to A_SS1 will be mapped into 0x3001_0000 - 0x3001_FFFF.
then If you configure FlexSPI->FLSHB1CR0[FLSHSZ] to the size 0x10000, then flash device connected to B_SS0 will be mapped into 0x3002_0000 - 0x3002_FFFF.
...