EasyManua.ls Logo

Elprotronic MSP430 - F_Copy_Flash_To_Buffer

Default Icon
119 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Example:
....................
....................
for( addr = 0x1000; addr<0x1100; addr++ )
st = F_Put_Byte_To_Buffer( addr, data[addr] );
st = F_Copy_Buffer_to_Flash( 0x1000, 0x100 );
....................
F_Copy_Flash_to_Buffer
F_Copy_Flash_to_Buffer - Read specified in “size” number of bytes from the Flash and save it
in the Read Data Buffer (see Figure 4.2). Starting address is specified
in the “start address”.
VALID FPA index - ( 1 to 64 ) or 0 (ALL FPAs) executed sequentially.
Syntax:
MSPPRG_API INT_X F_Copy_Flash_to_Buffer( LONG_X start_address,
LONG_X size );
Parameters:
start address - Even number from 0x1000 to 0x1FFFE,
size - Even number
Return value:
1 - TRUE if data has been read successfully
0 - FALSE.
-2 - FPA_INVALID_NO.
NOTE:
Specified address in the temporary flash buffer is the same as a physical FLASH
address.
Example:
....................
....................
st = F_Copy_Flash_to_Buffer( 0x1000, 0x100 );
if( st == TRUE )
{
for( addr = 0x1000; addr<0x1100; addr++ )
data[addr] = F_Get_Byte_from_Buffer( addr );
}
else
{
...................
}
....................
100

Table of Contents