![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
Example description
The Flash example shows how to use external NAND 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. No attempt at ECC is made in this example (which is required for data reliability for NAND FLASH).
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
JP2: 3-4 is 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 | BLOCK_INDEX 1 |
| #define | PAGE_INDEX 0 |
| #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 | waitForReady (void) |
| bool | checkBadBlock (uint32_t block) |
| int | main (void) |
| Main routine for example_nandflash. | |
Variables | |
| uint32_t | buffer [BUFFER_SIZE/sizeof(uint32_t)] |
| #define BLOCK_INDEX 1 |
Definition at line 70 of file nandflash.c.
| #define BUFFER_SIZE 0x40 |
Definition at line 74 of file nandflash.c.
| #define CHKTAG "NxP" |
Definition at line 77 of file nandflash.c.
| #define CHKTAG_SIZE 3 |
Definition at line 78 of file nandflash.c.
| #define ESC_CHAR 27 |
Definition at line 81 of file nandflash.c.
| #define PAGE_INDEX 0 |
Definition at line 72 of file nandflash.c.
| bool checkBadBlock | ( | uint32_t | block | ) |
Definition at line 172 of file nandflash.c.
| int main | ( | void | ) |
Main routine for example_nandflash.
Main program body.
Definition at line 190 of file nandflash.c.
|
static |
Definition at line 117 of file nandflash.c.
|
static |
Definition at line 91 of file nandflash.c.
| STATIC void waitForReady | ( | void | ) |
Definition at line 163 of file nandflash.c.
| uint32_t buffer[BUFFER_SIZE/sizeof(uint32_t)] |
Definition at line 84 of file nandflash.c.