MotorWare f2806x Driver API Documentation
Data Structures | Macros | Typedefs | Enumerations | Functions
flash.h File Reference

Contains public interface to various functions related to the flash (FLASH) object. More...

#include "sw/modules/types/src/types.h"
#include "sw/drivers/cpu/src/32b/f28x/f2806x/cpu.h"

Go to the source code of this file.

Data Structures

struct  _FLASH_Obj_
 Defines the flash (FLASH) object. More...
 

Macros

#define FLASH_BASE_ADDR   (0x00000A80)
 Defines the base address of the flash (FLASH) registers. More...
 
#define FLASH_ACTIVE_WAIT_COUNT_DEFAULT   (0x01FF)
 Defines the default active wait count in units of SYSCLKOUT cycles. More...
 
#define FLASH_STANDBY_WAIT_COUNT_DEFAULT   (0x01FF)
 Defines the default standby wait count in units of SYSCLKOUT cycles. More...
 
#define FLASH_FOPT_ENPIPE_BITS   (1 << 0)
 Defines the location of the ENPIPE bits in the FOPT register. More...
 
#define FLASH_FACTIVEWAIT_ACTIVEWAIT_BITS   (255 << 0)
 Defines the location of the ACTIVEWAIT bits in the FACTIVEWAIT register. More...
 
#define FLASH_FBANKWAIT_RANDWAIT_BITS   (15 << 0)
 Defines the location of the RANDWAIT bits in the FBANKWAIT register. More...
 
#define FLASH_FBANKWAIT_PAGEWAIT_BITS   (15 << 8)
 Defines the location of the PAGEWAIT bits in the FBANKWAIT register. More...
 
#define FLASH_FOTPWAIT_OTPWAIT_BITS   (31 << 0)
 Defines the location of the OTPWAIT bits in the FOTPWAIT register. More...
 
#define FLASH_FPWR_PWR_BITS   (3 << 0)
 Defines the location of the PWR bits in the FPWR register. More...
 
#define FLASH_FSTATUS_PWRS_BITS   (3 << 0)
 Defines the location of the PWRS bits in the FSTATUS register. More...
 
#define FLASH_FSTATUS_STDBYWAITS_BITS   (1 << 2)
 Defines the location of the STDBYWAITS bits in the FSTATUS register. More...
 
#define FLASH_FSTATUS_ACTIVEWAITS_BITS   (1 << 3)
 Defines the location of the ACTIVEWAITS bits in the FSTATUS register. More...
 
#define FLASH_FSTATUS_3VSTAT_BITS   (1 << 8)
 Defines the location of the 3VSTAT bits in the FSTATUS register. More...
 
#define FLASH_FSTDBYWAIT_STDBYWAIT_BITS   (255 << 0)
 Defines the location of the STDBYWAIT bits in the FSTDBYWAIT register. More...
 

Typedefs

typedef struct _FLASH_Obj_ FLASH_Obj
 Defines the flash (FLASH) object. More...
 
typedef struct _FLASH_Obj_FLASH_Handle
 Defines the flash (FLASH) handle. More...
 

Enumerations

enum  FLASH_3VStatus_e { FLASH_3VStatus_InRange =(0 << 8), FLASH_3VStatus_OutOfRange =(1 << 8) }
 Enumeration to define the 3V status. More...
 
enum  FLASH_CounterStatus_e { FLASH_CounterStatus_NotCounting =0, FLASH_CounterStatus_Counting }
 Enumeration to define the counter status. More...
 
enum  FLASH_NumOtpWaitStates_e {
  FLASH_NumOtpWaitStates_1 =(1 << 0), FLASH_NumOtpWaitStates_2 =(2 << 0), FLASH_NumOtpWaitStates_3 =(3 << 0), FLASH_NumOtpWaitStates_4 =(4 << 0),
  FLASH_NumOtpWaitStates_5 =(5 << 0), FLASH_NumOtpWaitStates_6 =(6 << 0), FLASH_NumOtpWaitStates_7 =(7 << 0), FLASH_NumOtpWaitStates_8 =(8 << 0),
  FLASH_NumOtpWaitStates_9 =(9 << 0), FLASH_NumOtpWaitStates_10 =(10 << 0), FLASH_NumOtpWaitStates_11 =(11 << 0), FLASH_NumOtpWaitStates_12 =(12 << 0),
  FLASH_NumOtpWaitStates_13 =(13 << 0), FLASH_NumOtpWaitStates_14 =(14 << 0), FLASH_NumOtpWaitStates_15 =(15 << 0)
}
 Enumeration to define the number of one-time programmable wait states. More...
 
enum  FLASH_NumPagedWaitStates_e {
  FLASH_NumPagedWaitStates_0 =(0 << 8), FLASH_NumPagedWaitStates_1 =(1 << 8), FLASH_NumPagedWaitStates_2 =(2 << 8), FLASH_NumPagedWaitStates_3 =(3 << 8),
  FLASH_NumPagedWaitStates_4 =(4 << 8), FLASH_NumPagedWaitStates_5 =(5 << 8), FLASH_NumPagedWaitStates_6 =(6 << 8), FLASH_NumPagedWaitStates_7 =(7 << 8),
  FLASH_NumPagedWaitStates_8 =(8 << 8), FLASH_NumPagedWaitStates_9 =(9 << 8), FLASH_NumPagedWaitStates_10 =(10 << 8), FLASH_NumPagedWaitStates_11 =(11 << 8),
  FLASH_NumPagedWaitStates_12 =(12 << 8), FLASH_NumPagedWaitStates_13 =(13 << 8), FLASH_NumPagedWaitStates_14 =(14 << 8), FLASH_NumPagedWaitStates_15 =(15 << 8)
}
 Enumeration to define the number of paged wait states. More...
 
enum  FLASH_NumRandomWaitStates_e {
  FLASH_NumRandomWaitStates_1 =(1 << 0), FLASH_NumRandomWaitStates_2 =(2 << 0), FLASH_NumRandomWaitStates_3 =(3 << 0), FLASH_NumRandomWaitStates_4 =(4 << 0),
  FLASH_NumRandomWaitStates_5 =(5 << 0), FLASH_NumRandomWaitStates_6 =(6 << 0), FLASH_NumRandomWaitStates_7 =(7 << 0), FLASH_NumRandomWaitStates_8 =(8 << 0),
  FLASH_NumRandomWaitStates_9 =(9 << 0), FLASH_NumRandomWaitStates_10 =(10 << 0), FLASH_NumRandomWaitStates_11 =(11 << 0), FLASH_NumRandomWaitStates_12 =(12 << 0),
  FLASH_NumRandomWaitStates_13 =(13 << 0), FLASH_NumRandomWaitStates_14 =(14 << 0), FLASH_NumRandomWaitStates_15 =(15 << 0)
}
 Enumeration to define the number of random wait states. More...
 
enum  FLASH_PowerMode_e { FLASH_PowerMode_PumpAndBankSleep =(0 << 0), FLASH_PowerMode_PumpAndBankStandby =(1 << 0), FLASH_PowerMode_PumpAndBankActive =(3 << 0) }
 Enumeration to define the power modes. More...
 

Functions

void FLASH_clear3VStatus (FLASH_Handle flashHandle)
 Clears the 3V status. More...
 
void FLASH_disablePipelineMode (FLASH_Handle flashHandle)
 Disables the pipeline mode. More...
 
void FLASH_enablePipelineMode (FLASH_Handle flashHandle)
 Enables the pipeline mode. More...
 
FLASH_3VStatus_e FLASH_get3VStatus (FLASH_Handle flashHandle)
 Gets the 3V status. More...
 
uint16_t FLASH_getActiveWaitCount (FLASH_Handle flashHandle)
 Gets the active wait count. More...
 
FLASH_CounterStatus_e FLASH_getActiveWaitStatus (FLASH_Handle flashHandle)
 Gets the active wait counter status. More...
 
FLASH_PowerMode_e FLASH_getPowerMode (FLASH_Handle flashHandle)
 Gets the power mode. More...
 
uint16_t FLASH_getStandbyWaitCount (FLASH_Handle flashHandle)
 Gets the standby wait count. More...
 
FLASH_CounterStatus_e FLASH_getStandbyWaitStatus (FLASH_Handle flashHandle)
 Gets the standby wait counter status. More...
 
FLASH_Handle FLASH_init (void *pMemory, const size_t numBytes)
 Initializes the flash (FLASH) handle. More...
 
void FLASH_setActiveWaitCount (FLASH_Handle flashHandle, const uint16_t count)
 Sets the active wait count. More...
 
void FLASH_setNumPagedReadWaitStates (FLASH_Handle flashHandle, const FLASH_NumPagedWaitStates_e numStates)
 Sets the number of paged read wait states. More...
 
void FLASH_setNumRandomReadWaitStates (FLASH_Handle flashHandle, const FLASH_NumRandomWaitStates_e numStates)
 Sets the number of random read wait states. More...
 
void FLASH_setOtpWaitStates (FLASH_Handle flashHandle, const FLASH_NumOtpWaitStates_e numStates)
 Sets the number of one-time programmable (OTP) wait states. More...
 
void FLASH_setPowerMode (FLASH_Handle flashHandle, const FLASH_PowerMode_e mode)
 Sets the power mode. More...
 
void FLASH_setStandbyWaitCount (FLASH_Handle flashHandle, const uint16_t count)
 Sets the standby wait count. More...
 

Detailed Description

Contains public interface to various functions related to the flash (FLASH) object.

(C) Copyright 2015, Texas Instruments, Inc.

Definition in file flash.h.