FUNCTION
WRITE ( FlashAddr,
Source, subblocksize
)
Source = arrayname | stringname
subblocksize = 0 | 256* | 512 | 1024 | 2048 | 4096 | 8192*
WRITE
copies data into the Flash memory space shared with
the user code Flash space. Generally space above 0x4000 is available, but
there is no protection for writing over your program.
FlashAddr must be alligned to subblocksize.
Data is copied from a string or array to the Flash. Only fixed block sizes are allowed.
To force a sector to be erased use a block size of 0. Flash is organized in blocks, 4K in ARMmite, ARMexpressLITE and ARMweb, 8K blocks in the ARMexpress. subblocksize portions may be written (ARMexpress allows 8K but not 256). Writing consists of erasing the whole block and then writing a portion or all. WRITE assumes that the block is to be erased when first written, or when the same portion is being written. When different portions of the same block are being written, an erase will only occur when WRITE is called with a subblocksize of 0.
These routines call the IAP routines for write, erase and prep commands. More details in the user manual for the corresponding CPU.
0 is returned on success, Non-zero error code when there is an error refer to IAP section in CPU user manual for definitions .