Go to the source code of this file.
Defines |
#define | __MSP430_HAS_FLASH__ |
#define | FLASH_READY_FOR_NEXT_WRITE WAIT_L |
#define | FLASH_ACCESS_VIOLATION_INTERRUPT_FLAG ACCVIFG_L |
#define | FLASH_PASSWORD_WRITTEN_INCORRECTLY KEYV_L |
#define | FLASH_BUSY BUSY_L |
Functions |
void | Flash_segmentErase (unsigned int baseAddress, unsigned char *Flash_ptr) |
void | Flash_bankErase (unsigned int baseAddress, unsigned char *Flash_ptr) |
unsigned short | Flash_eraseCheck (unsigned int baseAddress, unsigned char *Flash_ptr, unsigned int numberOfBytes) |
void | Flash_write8 (unsigned int baseAddress, unsigned char *Data_ptr, unsigned char *Flash_ptr, unsigned int numberOfBytes) |
void | Flash_write16 (unsigned int baseAddress, unsigned int *Data_ptr, unsigned int *Flash_ptr, unsigned int numberOfBytes) |
void | Flash_write32 (unsigned int baseAddress, unsigned long *Data_ptr, unsigned long *Flash_ptr, unsigned int numberOfBytes) |
void | Flash_memoryFill32 (unsigned int baseAddress, unsigned long value, unsigned long *Flash_ptr, unsigned int count) |
unsigned char | Flash_status (unsigned int baseAddress, unsigned char mask) |
Define Documentation
#define __MSP430_HAS_FLASH__ |
#define FLASH_READY_FOR_NEXT_WRITE WAIT_L |
#define FLASH_ACCESS_VIOLATION_INTERRUPT_FLAG ACCVIFG_L |
#define FLASH_PASSWORD_WRITTEN_INCORRECTLY KEYV_L |
#define FLASH_BUSY BUSY_L |
Function Documentation
void Flash_segmentErase |
( |
unsigned int |
baseAddress, |
|
|
unsigned char * |
Flash_ptr |
|
) |
| |
Erase a single segment of the flash memory.
- Parameters:
-
baseAddress | is the base address of the Flash module. |
Flash_ptr | is the pointer into the flash segment to be erased |
- Returns:
- NONE
References HWREG, and HWREGB.
void Flash_bankErase |
( |
unsigned int |
baseAddress, |
|
|
unsigned char * |
Flash_ptr |
|
) |
| |
Erase a single bank of the flash memory.
- Parameters:
-
baseAddress | is the base address of the Flash module. |
Flash_ptr | is a pointer into the bank to be erased |
- Returns:
- NONE
References HWREG, and HWREGB.
unsigned short Flash_eraseCheck |
( |
unsigned int |
baseAddress, |
|
|
unsigned char * |
Flash_ptr, |
|
|
unsigned int |
numberOfBytes |
|
) |
| |
Erase check of the flash memory
- Parameters:
-
baseAddress | is the base address of the Flash module. |
Flash_ptr | is the Pointer to the starting location of the erase check |
numberOfBytes | is the number of bytes to be checked |
- Returns:
- STATUS_SUCCESS or STATUS_FAIL
References STATUS_FAIL, and STATUS_SUCCESS.
void Flash_write8 |
( |
unsigned int |
baseAddress, |
|
|
unsigned char * |
Data_ptr, |
|
|
unsigned char * |
Flash_ptr, |
|
|
unsigned int |
numberOfBytes |
|
) |
| |
Write data into the flash memory in byte format.
- Parameters:
-
baseAddress | is the base address of the Flash module. |
Data_ptr | is the pointer to the data to be written |
Flash_ptr | is the pointer into which to write the data |
numberOfBytes | is the number of bytes to be written |
- Returns:
- NONE
References HWREG, and HWREGB.
void Flash_write16 |
( |
unsigned int |
baseAddress, |
|
|
unsigned int * |
Data_ptr, |
|
|
unsigned int * |
Flash_ptr, |
|
|
unsigned int |
numberOfBytes |
|
) |
| |
Write data into the flash memory in word format.
- Parameters:
-
baseAddress | is the base address of the Flash module. |
Data_ptr | is the pointer to the data to be written |
Flash_ptr | is the pointer into which to write the data |
numberOfBytes | is the number of bytes to be written |
- Returns:
- NONE
References HWREG, and HWREGB.
void Flash_write32 |
( |
unsigned int |
baseAddress, |
|
|
unsigned long * |
Data_ptr, |
|
|
unsigned long * |
Flash_ptr, |
|
|
unsigned int |
numberOfBytes |
|
) |
| |
Write data into the flash memory in long format, pass by reference
- Parameters:
-
baseAddress | is the base address of the Flash module. |
Data_ptr | is the pointer to the data to be written |
Flash_ptr | is the pointer into which to write the data |
numberOfBytes | is the number of bytes to be written |
- Returns:
- NONE
References HWREG, and HWREGB.
void Flash_memoryFill32 |
( |
unsigned int |
baseAddress, |
|
|
unsigned long |
value, |
|
|
unsigned long * |
Flash_ptr, |
|
|
unsigned int |
count |
|
) |
| |
Write data into the flash memory in long format, pass by value
- Parameters:
-
baseAddress | is the base address of the Flash module. |
Data_ptr | is the pointer to the data to be written |
Flash_ptr | is the pointer into which to write the data |
numberOfBytes | is the number of bytes to be written |
- Returns:
- NONE
References HWREG, and HWREGB.
unsigned char Flash_status |
( |
unsigned int |
baseAddress, |
|
|
unsigned char |
mask |
|
) |
| |
Check if Flash status to see if it is currently busy erasing or programming
- Parameters:
-
baseAddress | is the base address of the Flash module. |
mask | is the logical OR of the status mask requested (FLASH_READY_FOR_NEXT_WRITE) (FLASH_ACCESS_VIOLATION_INTERRUPT_FLAG) (FLASH_PASSWORD_WRITTEN_INCORRECTLY) (FLASH_BUSY) |
- Returns:
- logical OR of FLASH_READY_FOR_NEXT_WRITE/ FLASH_ACCESS_VIOLATION_INTERRUPT_FLAG/ FLASH_PASSWORD_WRITTEN_INCORRECTLY/FLASH_BUSY/0x00
References HWREGB.