Hi
There is an application note AN4533 about Kinetis Flash SWAP function.
Below is the common question abstracted from AN4533:
Are systems using swap limited to applications that fit within one of the two flash blocks (half the total flash memory size)?
In most use cases, the system application will be limited to executing within one flash block (active block). However, the swap system does not restrict code from executing in the nonactive block. Therefore, code can execute from either block at any time.
It is possible to use advanced techniques to expand the size of the application over the size of half the p-flash and still use flash swap. This would sacrifice some protection against problems, but gain more room for code. This is outside the scope of this application note.
Can the sector with the flash swap indicator be used for data/program storage?
Typically, the user specifies an unused flash sector to place the flash swap indicators. However, the swap system will not disturb the other data in the flash sector containing the indicators. So, that space can be used for program or data storage.
The space should be designated in the linker file accordingly.
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------