![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
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
There are no special connection requirements for this example.
Build procedures:
LPC18xx/43xx example quickstart for Keil uVision4
LPC18xx/43xx example quickstart for IAR EWARM
LPC18xx/43xx example quickstart for Code Red Xpresso
Supported boards and board setup:
Keil 1857 evaluation boards
Keil 4357 evaluation boards
Submitting LPCOpen issues:
Community support for LPCOpen
Macros | |
| #define | AUTOPROG_ON 1 |
| #define | PAGE_ADDR 0x01/* Page number */ |
| #define | CHKTAG "NxP" |
| #define | CHKTAG_SIZE 3 |
| #define | ESC_CHAR 27 |
Functions | |
| static void | ShowString (char *str) |
| static uint32_t | MakeString (uint8_t *str) |
| STATIC void | EEPROM_Read (uint32_t pageOffset, uint32_t pageAddr, uint32_t *ptr, uint32_t size) |
| STATIC void | EEPROM_Erase (uint32_t pageAddr) |
| STATIC void | EEPROM_Write (uint32_t pageOffset, uint32_t pageAddr, uint32_t *ptr, uint32_t size) |
| int | main (void) |
| Main program body. | |
Variables | |
| uint32_t | buffer [EEPROM_PAGE_SIZE/sizeof(uint32_t)] |
| int main | ( | void | ) |
| uint32_t buffer[EEPROM_PAGE_SIZE/sizeof(uint32_t)] |