User manual

mikroC PRO for dsPIC
MikroElektronika
371
FLASH_Read
FLASH_Read_Compact
Prototype
unsigned int* FLASH_Read(unsigned long address, unsigned int *write_to,
unsigned NoWords);
Description Reads required number of words from the ash memory in the “regular” mode.
Parameters - address: starting address of the FLASH memory block to be read
- write_to: starting address of RAM buffer for storing read data
- NoWords: number of words to be read
Returns Address of RAM buffer for storing read data.
Requires
Example
unsigned Buffer[64];
unsigned long start_address = 0x6500;
...
FLASH_Read(start_address, Buffer, 10);
Notes The user should take care of the address alignment (see the explanation at the beginning of this
page).
Prototype
void *FLASH_Read_Compact(unsigned long address, void *write_to, unsigned
NoBytes);
Description Reads required number of bytes from the ash memory in the “compact” mode.
Parameters - address: starting address of the FLASH memory block to be read
- write_to: starting address of RAM buffer for storing read data
- NoBytes: number of bytes to be read
Returns Address of RAM buffer for storing read data.
Requires
Example
char Buffer[64];
unsigned long start_address = 0x6500;
...
FLASH_Read_Compact(start_address, Buffer, 10);
Notes The user should take care of the address alignment (see the explanation at the beginning of this
page).