2021-06-20 01:06 AM
Hi,
I'm using the flash in a dual-bank mode. I would like to have a common (shared) sector between the 2 banks for storing configuration data.
This becomes somewhat tricky when addresses are shifting according to the active bank. How should I go about this?
Suppose my configuration is on FLASH_SECTOR_7_BANK1
How do I access this data when the active bank is 2 ?
10x
Eitan.
2021-06-20 07:10 AM
If banks are swapped, it's in the normal position of bank 2 sector 7.
if (SWAP_BANK == 1):
address = 0x081E0000
else:
address = 0x080E0000
Note that SWAP_BANK is only activated after a reset and not on-the-fly.