| 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
LPC18xx/43xx GPDMA Speed test example
Misc examples

## Detailed Description

Example description
This example benchmarks the data transfer speed of gpdma against cpu based transfer function memcpy.

UART needs to be setup prior to running the example as the example produces the output to the UART console.

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:
Hitex 1850 evaluation boards
Hitex 4350 evaluation boards
Keil 1857 evaluation boards
Keil 4357 evaluation boards

Submitting LPCOpen issues:
Community support for LPCOpen

## Macros
#define | TRANSFER_DST_ADDR 0x28500000
#define | TRANSFER_SRC_ADDR 0x28100000
#define | TRANSFER_SIZE 0x200000
#define | TRANSFER_BLOCK_SZ (4 * 3 * 1024) /* 3K of data transfered per LLI */
#define | DMA_DESCRIPTOR_COUNT 256

## Functions
static void | prepare_src_data (uint32_t *src, int sz)
static int | prepare_dma_desc (uint32_t *dst, const uint32_t *src, uint32_t sz)
static void | print_result (const void *dst, const void *src, int sz, uint32_t stime, uint32_t etime, const char *mode)
void | DMA_IRQHandler (void)
| RIT interrupt handler.
int | main (void)
| Main entry point.

## Variables
static uint8_t | ch_no
static DMA_TransferDescriptor_t | desc_array [DMA_DESCRIPTOR_COUNT]
static volatile int | dma_xfer_complete

## Macro Definition Documentation

#define DMA_DESCRIPTOR_COUNT 256

Definition at line 74 of file gpdma_speed_test.c.

#define TRANSFER_BLOCK_SZ (4 * 3 * 1024) /* 3K of data transfered per LLI */

Definition at line 73 of file gpdma_speed_test.c.

#define TRANSFER_DST_ADDR 0x28500000

Definition at line 69 of file gpdma_speed_test.c.

#define TRANSFER_SIZE 0x200000

Definition at line 71 of file gpdma_speed_test.c.

#define TRANSFER_SRC_ADDR 0x28100000

Definition at line 70 of file gpdma_speed_test.c.

## Function Documentation

void DMA_IRQHandler | ( | void |  | ) |

RIT interrupt handler.

Returns
  Nothing

Definition at line 148 of file gpdma_speed_test.c.

int main | ( | void |  | ) |

Main entry point.

Main program body.

Returns
  Nothing

Definition at line 158 of file gpdma_speed_test.c.

static int prepare_dma_desc | ( | uint32_t * | dst,
|  | const uint32_t * | src,
|  | uint32_t | sz
| ) |  |
| static

Definition at line 95 of file gpdma_speed_test.c.

static void prepare_src_data | ( | uint32_t * | src,
|  | int | sz
| ) |  |
| static

Definition at line 86 of file gpdma_speed_test.c.

static void print_result | ( | const void * | dst,
|  | const void * | src,
|  | int | sz,
|  | uint32_t | stime,
|  | uint32_t | etime,
|  | const char * | mode
| ) |  |
| static

Definition at line 124 of file gpdma_speed_test.c.

## Variable Documentation

uint8_t ch_no
| static

Definition at line 76 of file gpdma_speed_test.c.

DMA_TransferDescriptor_t desc_array[DMA_DESCRIPTOR_COUNT]
| static

Definition at line 77 of file gpdma_speed_test.c.

volatile int dma_xfer_complete
| static

Definition at line 78 of file gpdma_speed_test.c.