SetCodeMemory Method
This method will write to memory in the Program Memory Space. Writing to FLASH will not complete successfully if a client tries to write to the reserved area of FLASH, write more than one page of data at one time, or write to a write/erase locked sector. Also, if writing to a page that contains the read/write/erase lock bytes, a device erase will be performed (a device erase will erase the entire contents of FLASH except the reserved area). Please refer to the relevant device data sheets for additional information. If SetCodeMemory() completes successfully, only the specified range, wStartAddress + (UBound(bMem) - LBound(bMem)), will have successfully been written. All other values within the page will retain their initial values.
Syntax
object.SetCodeMemory( _
nStartAddress As Long, _
bMem As Byte() _
)
Parameters
nStartAddress
The start address of the memory location to be referenced.
bMem
Array with the bytes to be written. If the method completes successfully,
the entire Array has been programmed to the requested memory.