Code patching in FLASH memory is possible using the FLASH.AUTO command.
When only a few bytes within a FLASH sector need to be modified, FLASH.AUTO saves the existing sector content, erases the sector, writes the modified content, and restores the unchanged data.
The following command sequence is needed:
FLASH.AUTO ALL
Data.Assemble … ; Patch code in FLASH
Data.Set … ; Patch hex. value to FLASH
FLASH.AUTO off
Add a comment