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

Functions

void FRAM_write8 (unsigned int baseAddress, unsigned char *dataPtr, unsigned char *framPtr, unsigned int numberOfBytes)
void FRAM_write16 (unsigned int baseAddress, unsigned int *dataPtr, unsigned int *framPtr, unsigned int numberOfWords)
void FRAM_write32 (unsigned int baseAddress, unsigned long *dataPtr, unsigned long *framPtr, unsigned int count)
void FRAM_memoryFill32 (unsigned int baseAddress, unsigned long value, unsigned long *framPtr, unsigned int count)
void FRAM_enableInterrupt (unsigned int baseAddress, unsigned char interruptMask)
unsigned char FRAM_getInterruptStatus (unsigned int baseAddress, unsigned int interruptFlagMask)
void FRAM_disableInterrupt (unsigned int baseAddress, unsigned int interruptMask)
unsigned short FRAM_isBusy (unsigned int baseAddress)

Function Documentation

void FRAM_write8 ( unsigned int  baseAddress,
unsigned char *  dataPtr,
unsigned char *  framPtr,
unsigned int  numberOfBytes 
)

Write data into the fram memory in byte format.

Parameters:
baseAddressis the base address of the FRAM module.
dataPtris the pointer to the data to be written
framPtris the pointer into which to write the data
numberOfBytesis the number of bytes to be written
Returns:
NONE

References HWREGB.

void FRAM_write16 ( unsigned int  baseAddress,
unsigned int *  dataPtr,
unsigned int *  framPtr,
unsigned int  numberOfWords 
)

Write data into the fram memory in word format.

Parameters:
baseAddressis the base address of the Fram module.
dataPtris the pointer to the data to be written
framPtris the pointer into which to write the data
numberOfBytesis the number of bytes to be written
Returns:
NONE

References HWREGB.

void FRAM_write32 ( unsigned int  baseAddress,
unsigned long *  dataPtr,
unsigned long *  framPtr,
unsigned int  count 
)

Write data into the fram memory in long format, pass by reference

Parameters:
baseAddressis the base address of the Fram module.
dataPtris the pointer to the data to be written
framPtris the pointer into which to write the data
numberOfBytesis the number of bytes to be written
Returns:
NONE

References HWREGB.

void FRAM_memoryFill32 ( unsigned int  baseAddress,
unsigned long  value,
unsigned long *  framPtr,
unsigned int  count 
)

Write data into the fram memory in long format, pass by value

Parameters:
baseAddressis the base address of the Flash module.
valueis the value to written to FRAM memory
framPtris the pointer into which to write the data
numberOfBytesis the number of bytes to be written
Returns:
NONE

References HWREGB.

void FRAM_enableInterrupt ( unsigned int  baseAddress,
unsigned char  interruptMask 
)

Enables selected FRAM interrupt sources.

Parameters:
baseAddressis the base address of the FRAM module.
interruptMaskis the bit mask of the memory buffer interrupt sources to be disabled. Mask Value is the logical OR of any of the following FRAM_PUC_ON_UNCORRECTABLE_BIT - Enable PUC reset if FRAM uncorrectable bit error detected. FRAM_UNCORRECTABLE_BIT_INTERUPT - Interrupts when an uncorrectable bit error is detected. FRAM_CORRECTABLE_BIT_INTERRUPT - Interrupts when a correctable bit error is detected. FRAM_ACCESS_VIOLATION_INTERRUPT - Interrupts when an access violation occurs. FRAM_ACCESS_TIME_ERROR_INTERUPT - Interrupts when an access time error occurs.

If header file contains legacy definitions: FRAM_PUC_ON_DOUBLE_BIT_ERROR - Enable PUC reset if FRAM detects double bit error is detected. FRAM_DOUBLE_BIT_ERROR_INTERUPT - Interrupts when a double bit error is detected. FRAM_SINGLE_BIT_ERROR_INTERUPT - Interrupts when a single bit error is detected.

Disables the indicated FRAM interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.

Modified registers are FRCTL0, GCCTL0 and GCCTL1.

Returns:
NONE

References HWREG.

unsigned char FRAM_getInterruptStatus ( unsigned int  baseAddress,
unsigned int  interruptFlagMask 
)

Returns the status of the selected FRAM interrupt flags.

Parameters:
baseAddressis the base address of the FRAM module.
interruptFlagMaskis a bit mask of the interrupt flags status to be returned. Mask Value is the logical OR of any of the following FRAM_ACCESS_TIME_ERROR_FLAG.- Interrupt flag is set if a wrong setting for NPRECHG and NACCESS is set and FRAM access time is not hold. FRAM_UNCORRECTABLE_BIT_FLAG.- Interrupt flag is set if an uncorrectable bit error has been detected in the FRAM memory error detection logic. FRAM_CORRECTABLE_BIT_FLAG.- Interrupt flag is set if a correctable bit error has been detected and corrected in the FRAM memory error detection logic. FRAM_ACCESS_VIOLATION_FLAG.- Interrupt flag is set if an access violation is triggered.

If header file contains legacy definitions: FRAM_SINGLE_BIT_ERROR_FLAG - Interrupt flag is set if a correctable bit error has been detected and corrected in the FRAM memory error detection logic. FRAM_DOUBLE_BIT_ERROR_FLAG.- Interrupt flag is set if an uncorrectable bit error has been detected in the FRAM memory error detection logic.

Returns:
The current interrupt flag status for the corresponding mask.

References HWREG.

void FRAM_disableInterrupt ( unsigned int  baseAddress,
unsigned int  interruptMask 
)

Disables selected FRAM interrupt sources.

Parameters:
baseAddressis the base address of the FRAM module.
interruptMaskis the bit mask of the memory buffer interrupt sources to be disabled. Mask Value is the logical OR of any of the following FRAM_PUC_ON_UNCORRECTABLE_BIT - Enable PUC reset if FRAM uncorrectable bit error detected. FRAM_UNCORRECTABLE_BIT_INTERUPT - Interrupts when an uncorrectable bit error is detected. FRAM_CORRECTABLE_BIT_INTERRUPT - Interrupts when a correctable bit error is detected. FRAM_ACCESS_VIOLATION_INTERRUPT - Interrupts when an access violation occurs. FRAM_ACCESS_TIME_ERROR_INTERUPT - Interrupts when an access time error occurs.

If header file contains legacy definitions: FRAM_PUC_ON_DOUBLE_BIT_ERROR - Enable PUC reset if FRAM detects double bit error is detected. FRAM_DOUBLE_BIT_ERROR_INTERUPT - Interrupts when a double bit error is detected. FRAM_SINGLE_BIT_ERROR_INTERUPT - Interrupts when a single bit error is detected.

Disables the indicated FRAM interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor. Modified registers are FRCTL0 and GCCTL0.

Returns:
NONE

References HWREG.

unsigned short FRAM_isBusy ( unsigned int  baseAddress)

Returns the busy status of the FRAM core.

Parameters:
baseAddressis the base address of the FRAM module.

Returns a busy status if the FRAM is currently busy programming.

Returns:
FRAM_BUSY or FRAM_NOTBUSY dependent FRAM is currently busy programming.

References FRAM_BUSY, FRAM_NOTBUSY, and HWREG.


Copyright 2012, Texas Instruments Incorporated