DataStorage.c File Reference

#include "DataStorage.h"
#include "cpu.h"
#include "TIMotorLIB.h"

Go to the source code of this file.

Defines

#define STATUS_FAIL   0
#define STATUS_SUCCESS   1

Functions

void InitXintfTIMotorLIB (void)
void InitFlash (void)
Uint16 CsmUnlock ()
void InitDataStorageBuffer (STORAGEMODE mode)

Variables

Uint16 dataStorageBuffer [BUFSIZE]
Uint16 * dataPtr
Uint16 * begin
Uint16 * end
Uint32 * actualPos
Uint16 clearDataStorage
STORAGEMODE storageMode
volatile int flashlock = 0

Define Documentation

#define STATUS_FAIL   0

Definition at line 262 of file DataStorage.c.

#define STATUS_SUCCESS   1

Definition at line 263 of file DataStorage.c.


Function Documentation

Uint16 CsmUnlock (  ) 
Todo:
this function is implemented in DSP2833x_SysCtrl.c. However, there is a problem with the PLLSTS_BITS register.

Definition at line 267 of file DataStorage.c.

void InitDataStorageBuffer ( STORAGEMODE  mode  ) 

Initializes Buffer to hold data into internal memory

Parameters:
mode,: Data storage can be configured to OVERWRITE, NOVERWRITE. In OVERWRITE mode, the writing mechanism is restarted once the buffer end is reached, In NOVERWRITE the writing is stopped at the end buffer.
Examples:
TIMotorLIBExample1/main.c, TIMotorLIBExample2/main.c, TIMotorLIBExample3/main.c, TIMotorLIBExampleHrdw/main.c, and TIMotorLIBExampleSw/main.c.

Definition at line 306 of file DataStorage.c.

void InitFlash ( void   ) 
Todo:
this function is implemented in DSP2833x_SysCtrl.c. However, there is a problem with the PLLSTS_BITS register.

Definition at line 216 of file DataStorage.c.

void InitXintfTIMotorLIB ( void   ) 

----------------------------------------------------------------------------- Configure GPIO interface to external memory (XIntZ7):

  • GPIO64-79: Data bus (D15-D0)
  • GPIO40-47: Address bus (XA0-XA7)
  • GPIO80-87: Address bus (XA8-XA15)
  • GPIO39: Address bus (XA16)
  • GPIO34: XREADY
  • GPIO35: XRNW
  • GPIO38: XWE0
  • GPIO37: XZCS7
    Note:
    This code is from TI examples. ------------------------------------------------------------------------------
    ----------------------------------------------------------------------------- Initialize external interface
    Note:
    This code is from TI examples. ------------------------------------------------------------------------------

Definition at line 203 of file DataStorage.c.


Variable Documentation

Uint32* actualPos

Definition at line 35 of file DataStorage.c.

Uint16* begin

Definition at line 33 of file DataStorage.c.

Definition at line 36 of file DataStorage.c.

Uint16* dataPtr

Definition at line 32 of file DataStorage.c.

Uint16 dataStorageBuffer[BUFSIZE]
Todo:
: PABLO: These variables should be in a structure

Definition at line 31 of file DataStorage.c.

Uint16* end

Definition at line 34 of file DataStorage.c.

volatile int flashlock = 0

Definition at line 51 of file DataStorage.c.

Definition at line 37 of file DataStorage.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated on Sat Apr 16 11:42:44 2011 for TIMotorLIB by  doxygen 1.6.3