| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
LPC17xx/40xx External NOR Flash tests
Peripheral examples

## Detailed Description

Example description
The Flash example shows how to use external NOR Flash using EMC.
The example allows you to place a small string in a sector of the Flash 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
Embedded Artists' LPC1788 Developer's Kit
Embedded Artists' LPC4088 Developer's Kit

- JP1: ON

Build procedures:
LPC17xx/40xx example quickstart for Keil uVision4
LPC17xx/40xx example quickstart for IAR EWARM
LPC17xx/40xx example quickstart for Code Red Xpresso

Supported boards and board setup:
Embedded Artists' LPC1788 Developer's Kit
Embedded Artists' LPC4088 Developer's Kit

Submitting LPCOpen issues:
Community support for LPCOpen

## Macros
#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)
static void | ReadFlash (uint32_t addr, uint16_t *buffer, uint32_t size)
static void | WriteFlash (uint32_t addr, uint16_t *buffer, uint32_t size)
int | main (void)
| Main routine for example_norflash.

## Variables
uint32_t | buffer [BUFFER_SIZE/sizeof(uint32_t)]

## Macro Definition Documentation

#define BUFFER_SIZE 0x40

Definition at line 70 of file norflash.c.

#define CHKTAG "NxP"

Definition at line 73 of file norflash.c.

#define CHKTAG_SIZE 3

Definition at line 74 of file norflash.c.

#define ESC_CHAR 27

Definition at line 77 of file norflash.c.

## Function Documentation

int main | ( | void |  | ) |

Main routine for example_norflash.

Main program body.

Returns
  Nothing

Definition at line 182 of file norflash.c.

static uint32_t MakeString | ( | uint8_t * | str | ) |
| static

Definition at line 117 of file norflash.c.

static void ReadFlash | ( | uint32_t | addr,
|  | uint16_t * | buffer,
|  | uint32_t | size
| ) |  |
| static

Definition at line 160 of file norflash.c.

static void ShowString | ( | char * | str | ) |
| static

Definition at line 91 of file norflash.c.

static void WriteFlash | ( | uint32_t | addr,
|  | uint16_t * | buffer,
|  | uint32_t | size
| ) |  |
| static

Definition at line 169 of file norflash.c.

## Variable Documentation

uint32_t buffer[BUFFER_SIZE/sizeof(uint32_t)]

Definition at line 80 of file norflash.c.