LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
LPC18xx/43xx IRAM programming algorithm for the DFU Utility

Detailed Description

Example description
This programming algorithm allows upload and download of data to and from IRAM or any peripheral registers. The entire 4GB memory range is accessible.

More information on using the DFU Utility can be found at the following links:
DFU Utility information
DFU Utility production programming API

Special connection requirements
There are no special connection requirements for this example.

Build procedures:
LPC18xx/43xx example quickstart for Keil uVision4

Supported boards and board setup:
Although this example includes a build target for only the Keil 1857 board, it should run on all 18xx or 43xx boards.
Keil 1857 evaluation boards

Submitting LPCOpen issues:
Community support for LPCOpen

Macros

#define PROGRAM_REGIONS   1
 
#define DFU_BUFF_PROG_SIZE   2048
 

Functions

int32_t progalgo_emiram_erase (uint32_t start, uint32_t size)
 
int32_t progalgo_emiram_erase_all (void)
 
int32_t progalgo_emiram_write (void *buff, uint32_t start, uint32_t size)
 
int32_t progalgo_emiram_read (void *buff, uint32_t start, uint32_t size)
 
DFUPROG_REGION_Talgo_flash_init (void)
 Initializes device programming capability.
 

Variables

static const PROGALGOS_T palgos
 
static const DFUPROG_REGZONE_T pregions [PROGRAM_REGIONS]
 
static DFUPROG_REGION_T dfuregion
 
static char tempSTR [64]
 

Macro Definition Documentation

#define DFU_BUFF_PROG_SIZE   2048

Definition at line 73 of file dfuutil_programming_any_algorithm.c.

#define PROGRAM_REGIONS   1

Definition at line 70 of file dfuutil_programming_any_algorithm.c.

Function Documentation

DFUPROG_REGION_T* algo_flash_init ( void  )

Initializes device programming capability.

Returns
A pointer to the programming info structure Initializes device programming capability. Returns a pointer to the programming buffer, the programming buffer size, and a pointer to the DFU programming region/API structure used by the DFU streamer.

Definition at line 183 of file dfuutil_programming_any_algorithm.c.

void dfuUtilSystemInit ( void  )

Very minor system initialization.

Returns
none The DFU Utility setup does the minimum amount of setup as possible to be portable among different devices.

Definition at line 60 of file dfuutil_programming_any_systeminit.c.

static int32_t progalgo_emiram_erase ( uint32_t  start,
uint32_t  size 
)

Definition at line 121 of file dfuutil_programming_any_algorithm.c.

static int32_t progalgo_emiram_erase_all ( void  )

Definition at line 135 of file dfuutil_programming_any_algorithm.c.

static int32_t progalgo_emiram_read ( void *  buff,
uint32_t  start,
uint32_t  size 
)

Definition at line 163 of file dfuutil_programming_any_algorithm.c.

static int32_t progalgo_emiram_write ( void *  buff,
uint32_t  start,
uint32_t  size 
)

Definition at line 149 of file dfuutil_programming_any_algorithm.c.

Variable Documentation

DFUPROG_REGION_T dfuregion
static
Initial value:

Definition at line 99 of file dfuutil_programming_any_algorithm.c.

const DFUPROG_REGZONE_T pregions[PROGRAM_REGIONS]
static
Initial value:
= {
{0x00000000, 0xFFFFFFFC}
}

Definition at line 93 of file dfuutil_programming_any_algorithm.c.

char tempSTR[64]
static

Definition at line 109 of file dfuutil_programming_any_algorithm.c.