Example description
This example describes how to use the SD/MMC interface with a SD card and a FATFS filesystem.
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)
- NGX LPC1830 LPC4330 (no debug output terminal)
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
NGX 1830 Xplorer boards
NGX 4330 Xplorer boards
Submitting LPCOpen issues:
Community support for LPCOpen
| static void App_SDMMC_Init |
( |
| ) |
|
|
static |
Error processing function: stop with dying message.
- Parameters
-
- Returns
- Nothing
Definition at line 210 of file sdmmc.c.
Main routine for SDMMC example.
Main program body.
- Returns
- Nothing
Definition at line 237 of file sdmmc.c.
| void SDIO_IRQHandler |
( |
void |
| ) |
|
SDIO controller interrupt handler.
- Returns
- Nothing
Definition at line 220 of file sdmmc.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 145 of file sdmmc.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 131 of file sdmmc.c.
| static void sdmmc_waitms |
( |
uint32_t |
time | ) |
|
|
static |
Type used for SD Card handle
Definition at line 100 of file sdmmc.c.
| volatile int32_t sdio_wait_exit = 0 |
|
static |