SLAU358Q September 2011 – October 2019
MSPGANG_LoadImageBlock saves the previously prepared image contents into the selected image memory. The selected image memory is automatically erased first (MSPGANG_EraseImage is called automatically, your application code does NOT need to call it explicitly). Use the following sequence for preparing and saving an image into image memory:
MSPGANG_CreateGangImage(name);
MSPGANG_SelectImage(lImage);
MSPGANG_EraseImage();
MSPGANG_LoadImageBlock();
MSPGANG_VerifyPSAImageBlock();
Syntax
LONG MSPGANG_LoadImageBlock(void)
Arguments
None |
Result
LONG | Error code |
NOTE
Do not overwrite images unnecessarily during production
The image flash memory has a specified 10000 endurance cycles. Therefore, over the lifetime of the product, each image can be reliably reprogrammed 10000 times. Reprogramming images should be done once per production setup, rather than per programming run. Reprogramming the image per programming run will quickly exhaust flash endurance cycles and result in errant behavior.
//Ideally, load image once per setup. Reduce programming time and save flash endurance cycles.
//Loading an image usually takes longer than full target device programming.
MSPGANG_CreateGangImage(...);
MSPGANG_LoadImageBlock();
...
do
{
...
MSPGANG_MainProcess(...);
...
} while(...);
//Avoid loading image inside loop if possible.
//Loading image per programming cycle wastes time and quickly uses up flash endurance cycles.
do
{
MSPGANG_CreateGangImage(...);
MSPGANG_LoadImageBlock();
MSPGANG_MainProcess(...);
} while(...);