Texas Instruments TMS320C6000 Manuale Utente

Pagina di 62
FLASH_write
6-7
 FLASH API Module
Description
Writes data to the Flash address (locator) from a source address (src).
This function is limited by the page length of the Flash memory.
Note: This function does not affect unspecified segments of Flash. For
example, altering the lower half of a page of Flash memory does not
change the value of the upper half page.
C6711 DSK
-
Locator contains 32-bit address of Flash location
-
FLASH_START_ADDR is 0x9000000
-
Flash address range: 0x90000000 to 0x90020000
-
FLASH_PAGE_SIZE = 0x80: 128 bytes
-
Page number range: 0 to 1023
-
FLASH_PAGE_ADDR(x) = FLASH_START_ADDR +
x*FLASH_PAGE_SIZE )
-
If the source address begins in the middle of a page, the write will
invalidate all other data on the page.
Example
To write from writeBuffer to pages 1 and 2:
char writeBuffer[FLASH_PAGE_SIZE*2];
FLASH_write((Uint32)writeBuffer, 
            FLASH_PAGE_ADDR(1), 
            FLASH_PAGE_SIZE * 2);