LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
LPC13xx EEPROM example

Detailed Description

Example description
The EEPROM example shows how to use EEPROM interface driver.
The examples allows you to place a small string in a single page of the EEPROM and the string will remain across reset cycles.

To use the example, connect a serial cable to the board's RS232/UART port and start a terminal program to monitor the port. The terminal program on the host PC should be setup for 115K8N1.

Special connection requirements
Need to connect with base board for using RS232/UART port.

Build procedures:
LPC13xx example quickstart for Code Red Xpresso
LPC13xx example quickstart for Keil uVision4
LPC13xx example quickstart for IAR EWARM

Supported boards and board setup:
NXP Xpresso LPC1347 board

Submitting LPCOpen issues:
Community support for LPCOpen

Macros

#define EEPROM_ADDR   0x40
 
#define BUFFER_SIZE   0x40
 
#define CHKTAG   "NxP"
 
#define CHKTAG_SIZE   3
 
#define ESC_CHAR   27
 

Functions

static void ShowString (char *str)
 
static uint32_t MakeString (uint8_t *str)
 
int main (void)
 Main program body.
 

Variables

uint32_t buffer [BUFFER_SIZE/sizeof(uint32_t)]
 

Macro Definition Documentation

#define BUFFER_SIZE   0x40

Definition at line 71 of file eeprom.c.

#define CHKTAG   "NxP"

Definition at line 74 of file eeprom.c.

#define CHKTAG_SIZE   3

Definition at line 75 of file eeprom.c.

#define EEPROM_ADDR   0x40

Definition at line 68 of file eeprom.c.

#define ESC_CHAR   27

Definition at line 78 of file eeprom.c.

Function Documentation

int main ( void  )

Main program body.

Returns
Does not return

defined(CHIP_LPC175X_6X)

Definition at line 163 of file eeprom.c.

static uint32_t MakeString ( uint8_t *  str)
static

Definition at line 114 of file eeprom.c.

static void ShowString ( char *  str)
static

Definition at line 88 of file eeprom.c.

Variable Documentation

uint32_t buffer[BUFFER_SIZE/sizeof(uint32_t)]

Definition at line 81 of file eeprom.c.