| 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
LPC18xx/43xx SDMMC benchmark example
Misc examples

## Detailed Description

Example description
This example measures the SDMMC raw (without file system) I/O perfromance. The SDMMC read & write performance will be measured. Please note that the code will be executed from IARM memory.

To use the example, plug a SD card (Hitex A4 board) or microSD card (NGX or Keil boards) and connect a serial cable to the board's RS232/UART port start a terminal program to monitor the port. The terminal program on the host PC should be setup for 115K8N1.

Special connection requirements

- Hitex LPC1850EVA-A4-2 and LPC4350EVA-A4-2 boards
  - Close pin 1-2 of JP9
  - Open all SV3, SV6
  - Close all SV12
  - Uart1 terminal port: SV11-p2(U1_RXD) connect to SV1-p7, SV11-p4 (U1_TXD) connect to SV1-p5
- Keil MCB1857 and MCB4357 boards (debug output terminal on Uart3)

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 | debugstr(str) DEBUGSTR(str)
#define | NUM_SECTORS 2048
#define | NUM_ITER 10
#define | START_SECTOR 32
#define | BUFFER_SIZE (NUM_SECTORS * MMC_SECTOR_SIZE)

## Functions
| LOCATE_AT (0x28200000)
static void | sdmmc_setup_wakeup (void *bits)
| Sets up the SD event driven wakeup.
static uint32_t | sdmmc_irq_driven_wait (void)
| A better wait callback for SDMMC driven by the IRQ flag.
static void | App_SDMMC_Init ()
static void | Prepare_Buffer (uint32_t value)
static void | print_meas_data (void)
void | SDIO_IRQHandler (void)
| SDIO controller interrupt handler.
int | main (void)
| Main routine for SDMMC example.

## Macro Definition Documentation

#define BUFFER_SIZE (NUM_SECTORS * MMC_SECTOR_SIZE)

Definition at line 108 of file app_sdmmc_meas.c.

#define debugstr | ( |  | str | ) | DEBUGSTR(str)

Definition at line 95 of file app_sdmmc_meas.c.

#define NUM_ITER 10

Definition at line 102 of file app_sdmmc_meas.c.

#define NUM_SECTORS 2048

Definition at line 99 of file app_sdmmc_meas.c.

#define START_SECTOR 32

Definition at line 105 of file app_sdmmc_meas.c.

## Function Documentation

static void App_SDMMC_Init | ( |  | ) |
| static

Definition at line 196 of file app_sdmmc_meas.c.

LOCATE_AT | ( | 0x28200000 |  | ) |

Definition at line 115 of file app_sdmmc_meas.c.

int main | ( | void |  | ) |

Main routine for SDMMC example.

Main program body.

Returns
  Nothing

Definition at line 316 of file app_sdmmc_meas.c.

static void Prepare_Buffer | ( | uint32_t | value | ) |
| static

Definition at line 211 of file app_sdmmc_meas.c.

static void print_meas_data | ( | void |  | ) |
| static

Definition at line 251 of file app_sdmmc_meas.c.

void SDIO_IRQHandler | ( | void |  | ) |

SDIO controller interrupt handler.

Returns
  Nothing

Definition at line 299 of file app_sdmmc_meas.c.

static uint32_t sdmmc_irq_driven_wait | ( | void |  | ) |
| static

A better wait callback for SDMMC driven by the IRQ flag.

Returns
  0 on success, or failure condition (-1)

Definition at line 182 of file app_sdmmc_meas.c.

static void sdmmc_setup_wakeup | ( | void * | bits | ) |
| static

Sets up the SD event driven wakeup.

Parameters

  bits | : Status bits to poll for command completion

Returns
  Nothing

Definition at line 168 of file app_sdmmc_meas.c.