Functions
flash.c File Reference
#include "inc/hw_types.h"
#include "driverlib/5xx_6xx/debug.h"
#include "driverlib/5xx_6xx/flash.h"
#include "deprecated/CCS/msp430xgeneric.h"

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)

Function Documentation

void Flash_segmentErase ( unsigned int  baseAddress,
unsigned char *  Flash_ptr 
)

Erase a single segment of the flash memory.

Parameters:
baseAddressis the base address of the Flash module.
Flash_ptris 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:
baseAddressis the base address of the Flash module.
Flash_ptris 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:
baseAddressis the base address of the Flash module.
Flash_ptris the Pointer to the starting location of the erase check
numberOfBytesis 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:
baseAddressis the base address of the Flash module.
Data_ptris the pointer to the data to be written
Flash_ptris the pointer into which to write the data
numberOfBytesis 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:
baseAddressis the base address of the Flash module.
Data_ptris the pointer to the data to be written
Flash_ptris the pointer into which to write the data
numberOfBytesis 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:
baseAddressis the base address of the Flash module.
Data_ptris the pointer to the data to be written
Flash_ptris the pointer into which to write the data
numberOfBytesis 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:
baseAddressis the base address of the Flash module.
Data_ptris the pointer to the data to be written
Flash_ptris the pointer into which to write the data
numberOfBytesis 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:
baseAddressis the base address of the Flash module.
maskis 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.


Copyright 2012, Texas Instruments Incorporated