F_Memory_Read
F_Memory_Read - Read contents of the Target’s Flash Memory.
VALID FPA index - ( 1 to 64 )
Size of the read memory size is defined in the configuration setup
FlashReadModeIndex, ReadSegmA, ReadSegmB, ReadStartAddr, ReadStopAddr.
All data will be saved in destination byte buffer.
IMPORTANT: Declared size of this buffer must be at least 0x1F000. The biggest Flash
memory size (currently 120kB in the MSP430X) can be transferred from target
to mentioned buffer. If buffer is smaller, then application will crash during
execution.
This function reads the data from the flash memory starting at address 0x1000.
At the [0x0000] location - byte taken from the Flash memory at location 0x1000;
.............................................................................................................................
At the [0xEFFF] location - byte taken from the Flash memory at location 0xFFFF;
It is recommended to use the F_Copy_All_Flash_to_Buffer() instruction combined with the
F_Get_Byte_from_Buffer(..) instead F_Memory_Read(). The F_Copy_All_Flash_to_Buffer()
instruction uses all internal buffers and size of the external buffer is irrelevant . Read contents from
the flash saved in the Read Data Buffer (see Figure 4.2) can be read from them byte by byte using
the F_Get_Byte_From_Buffer(...). The size of the Read Data Buffer is adjusted to the latest size of
the MSP430 flash memory and user can read only desired data size from this buffer, avoiding
crashing problem if from any reason the data buffer size in user’s application software is too small.
Also the F_Copy_All_Flash_to_Buffer() can run simultaneously if more then one FPA are used,
saving significantly execution time. The function F_Memory_Read(..) cannot be executed
simultaneously. So, when more then one FPA is used then the reading time is much faster if the
F_Copy_All_Flash_to_Buffer() instead F_Memory_Read(..) is used.
Syntax:
MSPPRG_API INT_X F_Memory_Read( unsigned char * data );
Return value:
0 - FALSE
1 - TRUE
-2 (0xFFFFFFFE) - FPA_INVALID_NO
Example:
unsigned int data[0x1F000];
88