LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
IP: Flash/EEPROM programming

Detailed Description

Data Structures

struct  FLASH_COMMAND_T
 Command parameter table structure. More...
 
struct  FLASH_OUTPUT_T
 Command result table structure. More...
 
struct  FLASH_PREPARE_SECTORS_COMMAND_T
 [Prepare sectors] command parameter table structure More...
 
struct  FLASH_PREPARE_SECTORS_OUTPUT_T
 [Prepare sectors] command result table structure More...
 
struct  FLASH_COPY_RAM_TO_FLASH_COMMAND_T
 [Copy Ram to Flash] command parameter table structure More...
 
struct  FLASH_COPY_RAM_TO_FLASH_OUTPUT_T
 [Copy Ram to Flash] command result table structure More...
 
struct  FLASH_ERASE_SECTORS_COMMAND_T
 [Erase Sector(s)] command parameter table structure More...
 
struct  FLASH_ERASE_SECTORS_OUTPUT_T
 [Erase Sector(s)] command result table structure More...
 
struct  FLASH_BLANK_CHECK_SECTORS_COMMAND_T
 [Blank check sector(s)] command parameter table structure More...
 
struct  FLASH_BLANK_CHECK_SECTORS_OUTPUT_T
 [Blank check sector(s)] command result table structure More...
 
struct  FLASH_READ_PART_ID_COMMAND_T
 [Read Part Identification number] command parameter table structure More...
 
struct  FLASH_READ_PART_ID_OUTPUT_T
 [Read Part Identification number] command result table structure More...
 
struct  FLASH_READ_BOOTCODE_VER_COMMAND_T
 [Read Boot code version number] command parameter table structure More...
 
struct  FLASH_READ_BOOTCODE_VER_OUTPUT_T
 [Read Boot code version number] command result table structure More...
 
struct  FLASH_COMPARE_MEM_COMMAND_T
 [Compare memory] command parameter table structure More...
 
struct  FLASH_COMPARE_MEM_OUTPUT_T
 [Compare memory] command result table structure More...
 
struct  FLASH_REINVOKE_ISP_COMMAND_T
 [Reinvoke ISP] command parameter table structure More...
 
struct  FLASH_REINVOKE_ISP_OUTPUT_T
 [Reinvoke ISP] command result table structure More...
 
struct  FLASH_READ_UID_COMMAND_T
 [ReadUID] command parameter table structure More...
 
struct  FLASH_READ_UID_OUTPUT_T
 [ReadUID] command result table structure More...
 

Macros

#define FLASH_PARAMETER_NUM   (5)
 
#define FLASH_RESULT_NUM   (4)
 

Typedefs

typedef void(* FLASH_ENTRY_T )(unsigned int[], unsigned int[])
 

Enumerations

enum  FLASH_CMD_CODE_T {
  FLASH_PREPARE = 50, FLASH_COPY_RAM_TO_FLASH = 51, FLASH_ERASE = 52, FLASH_BLANK_CHECK = 53,
  FLASH_READ_PART_ID = 54, FLASH_READ_BOOT_VER = 55, FLASH_COMPARE = 56, FLASH_REINVOKE_ISP = 57,
  FLASH_READ_UID = 58
}
 Flash command code definitions. More...
 
enum  FLASH_STATUS_CODE_T {
  CMD_SUCCESS, INVALID_COMMAND, SRC_ADDR_ERROR, DST_ADDR_ERROR,
  SRC_ADDR_NOT_MAPPED, DST_ADDR_NOT_MAPPED, COUNT_ERROR, INVALID_SECTOR,
  SECTOR_NOT_BLANK, SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION, COMPARE_ERROR, BUSY
}
 Flash status code definitions. More...
 

Functions

STATIC INLINE void IP_FLASH_Execute (FLASH_ENTRY_T entry, FLASH_COMMAND_T *pCommand, FLASH_OUTPUT_T *pOutput)
 Execute flash programming command.
 

Macro Definition Documentation

#define FLASH_PARAMETER_NUM   (5)

The maximum number of flash programing parameters

Definition at line 53 of file flash_001.h.

#define FLASH_RESULT_NUM   (4)

The maximum number of flash programing results

Definition at line 56 of file flash_001.h.

Typedef Documentation

typedef void(* FLASH_ENTRY_T)(unsigned int[], unsigned int[])

Flash programming function type

Definition at line 59 of file flash_001.h.

Enumeration Type Documentation

Flash command code definitions.

Enumerator:
FLASH_PREPARE 

Prepare sector(s) for write operation

FLASH_COPY_RAM_TO_FLASH 

Copy RAM to Flash

FLASH_ERASE 

Erase sector(s)

FLASH_BLANK_CHECK 

Blank check sector(s)

FLASH_READ_PART_ID 

Read chip part ID

FLASH_READ_BOOT_VER 

Read chip boot code version

FLASH_COMPARE 

Compare memory areas

FLASH_REINVOKE_ISP 

Reinvoke ISP

FLASH_READ_UID 

Read UID

Definition at line 64 of file flash_001.h.

Flash status code definitions.

Enumerator:
CMD_SUCCESS 

Command is executed successfully.

INVALID_COMMAND 

Invalid command.

SRC_ADDR_ERROR 

Source address is not on a word boundary.

DST_ADDR_ERROR 

Destination address is not on a correct boundary.

SRC_ADDR_NOT_MAPPED 

Source address is not mapped in the memory map.

DST_ADDR_NOT_MAPPED 

Destination address is not mapped in the memory map.

COUNT_ERROR 

Byte count is not multiple of 4 or is not a permitted value.

INVALID_SECTOR 

Sector number is invalid.

SECTOR_NOT_BLANK 

Sector is not blank.

SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION 

Command to prepare sector for write operation was not executed.

COMPARE_ERROR 

Source and destination data is not same.

BUSY 

Flash programming hardware interface is busy.

Definition at line 86 of file flash_001.h.

Function Documentation

STATIC INLINE void IP_FLASH_Execute ( FLASH_ENTRY_T  entry,
FLASH_COMMAND_T pCommand,
FLASH_OUTPUT_T pOutput 
)

Execute flash programming command.

Parameters
entry: Flash Programing entry
pCommand: Command information
pOutput: Output information
Returns
Nothing

Definition at line 171 of file flash_001.h.