Memory to Memory DMA demo from CMSIS example. This demo execute 1000 times of 32 word memory to memory DMA (copy), and also measures number of dummy loop execution during DMA cylcles. Line 56 of "DMA_M2M.c" can change DMA source. where; 1)static : source is SRAM 2)const : source is Flash ROM

Dependencies:   mbed

Committer:
todotani
Date:
Sun Nov 14 03:26:04 2010 +0000
Revision:
0:692bf16d1455
2010/11/14

Who changed what in which revision?

UserRevisionLine numberNew contents of line
todotani 0:692bf16d1455 1 /***********************************************************************//**
todotani 0:692bf16d1455 2 * @file lpc17xx_libcfg.h
todotani 0:692bf16d1455 3 * @purpose Library configuration file
todotani 0:692bf16d1455 4 * @version 2.0
todotani 0:692bf16d1455 5 * @date 21. May. 2010
todotani 0:692bf16d1455 6 * @author NXP MCU SW Application Team
todotani 0:692bf16d1455 7 **************************************************************************
todotani 0:692bf16d1455 8 * Software that is described herein is for illustrative purposes only
todotani 0:692bf16d1455 9 * which provides customers with programming information regarding the
todotani 0:692bf16d1455 10 * products. This software is supplied "AS IS" without any warranties.
todotani 0:692bf16d1455 11 * NXP Semiconductors assumes no responsibility or liability for the
todotani 0:692bf16d1455 12 * use of the software, conveys no license or title under any patent,
todotani 0:692bf16d1455 13 * copyright, or mask work right to the product. NXP Semiconductors
todotani 0:692bf16d1455 14 * reserves the right to make changes in the software without
todotani 0:692bf16d1455 15 * notification. NXP Semiconductors also make no representation or
todotani 0:692bf16d1455 16 * warranty that such application will be suitable for the specified
todotani 0:692bf16d1455 17 * use without further testing or modification.
todotani 0:692bf16d1455 18 **************************************************************************/
todotani 0:692bf16d1455 19
todotani 0:692bf16d1455 20 #ifndef LPC17XX_LIBCFG_H_
todotani 0:692bf16d1455 21 #define LPC17XX_LIBCFG_H_
todotani 0:692bf16d1455 22
todotani 0:692bf16d1455 23 #include "lpc_types.h"
todotani 0:692bf16d1455 24
todotani 0:692bf16d1455 25
todotani 0:692bf16d1455 26 /************************** DEBUG MODE DEFINITIONS *********************************/
todotani 0:692bf16d1455 27 /* Un-comment the line below to compile the library in DEBUG mode, this will expanse
todotani 0:692bf16d1455 28 the "CHECK_PARAM" macro in the FW library code */
todotani 0:692bf16d1455 29
todotani 0:692bf16d1455 30 #define DEBUG
todotani 0:692bf16d1455 31
todotani 0:692bf16d1455 32
todotani 0:692bf16d1455 33 /******************* PERIPHERAL FW LIBRARY CONFIGURATION DEFINITIONS ***********************/
todotani 0:692bf16d1455 34
todotani 0:692bf16d1455 35 /* Comment the line below to disable the specific peripheral inclusion */
todotani 0:692bf16d1455 36
todotani 0:692bf16d1455 37 /* DEBUG_FRAMWORK ------------------------------ */
todotani 0:692bf16d1455 38 #define _DBGFWK
todotani 0:692bf16d1455 39
todotani 0:692bf16d1455 40 /* GPIO ------------------------------- */
todotani 0:692bf16d1455 41 //#define _GPIO
todotani 0:692bf16d1455 42
todotani 0:692bf16d1455 43 /* EXTI ------------------------------- */
todotani 0:692bf16d1455 44 //#define _EXTI
todotani 0:692bf16d1455 45
todotani 0:692bf16d1455 46 /* UART ------------------------------- */
todotani 0:692bf16d1455 47 #define _UART
todotani 0:692bf16d1455 48 #define _UART0
todotani 0:692bf16d1455 49 //#define _UART1
todotani 0:692bf16d1455 50 //#define _UART2
todotani 0:692bf16d1455 51 //#define _UART3
todotani 0:692bf16d1455 52
todotani 0:692bf16d1455 53 /* SPI ------------------------------- */
todotani 0:692bf16d1455 54 //#define _SPI
todotani 0:692bf16d1455 55
todotani 0:692bf16d1455 56 /* SSP ------------------------------- */
todotani 0:692bf16d1455 57 //#define _SSP
todotani 0:692bf16d1455 58 //#define _SSP0
todotani 0:692bf16d1455 59 //#define _SSP1
todotani 0:692bf16d1455 60
todotani 0:692bf16d1455 61 /* SYSTICK --------------------------- */
todotani 0:692bf16d1455 62 //#define _SYSTICK
todotani 0:692bf16d1455 63
todotani 0:692bf16d1455 64 /* I2C ------------------------------- */
todotani 0:692bf16d1455 65 //#define _I2C
todotani 0:692bf16d1455 66 //#define _I2C0
todotani 0:692bf16d1455 67 //#define _I2C1
todotani 0:692bf16d1455 68 //#define _I2C2
todotani 0:692bf16d1455 69
todotani 0:692bf16d1455 70 /* TIMER ------------------------------- */
todotani 0:692bf16d1455 71 //#define _TIM
todotani 0:692bf16d1455 72
todotani 0:692bf16d1455 73 /* WDT ------------------------------- */
todotani 0:692bf16d1455 74 //#define _WDT
todotani 0:692bf16d1455 75
todotani 0:692bf16d1455 76
todotani 0:692bf16d1455 77 /* GPDMA ------------------------------- */
todotani 0:692bf16d1455 78 #define _GPDMA
todotani 0:692bf16d1455 79
todotani 0:692bf16d1455 80
todotani 0:692bf16d1455 81 /* DAC ------------------------------- */
todotani 0:692bf16d1455 82 //#define _DAC
todotani 0:692bf16d1455 83
todotani 0:692bf16d1455 84 /* DAC ------------------------------- */
todotani 0:692bf16d1455 85 //#define _ADC
todotani 0:692bf16d1455 86
todotani 0:692bf16d1455 87
todotani 0:692bf16d1455 88 /* PWM ------------------------------- */
todotani 0:692bf16d1455 89 //#define _PWM
todotani 0:692bf16d1455 90 //#define _PWM1
todotani 0:692bf16d1455 91
todotani 0:692bf16d1455 92 /* RTC ------------------------------- */
todotani 0:692bf16d1455 93 //#define _RTC
todotani 0:692bf16d1455 94
todotani 0:692bf16d1455 95 /* I2S ------------------------------- */
todotani 0:692bf16d1455 96 //#define _I2S
todotani 0:692bf16d1455 97
todotani 0:692bf16d1455 98 /* USB device ------------------------------- */
todotani 0:692bf16d1455 99 //#define _USBDEV
todotani 0:692bf16d1455 100 //#define _USB_DMA
todotani 0:692bf16d1455 101
todotani 0:692bf16d1455 102 /* QEI ------------------------------- */
todotani 0:692bf16d1455 103 //#define _QEI
todotani 0:692bf16d1455 104
todotani 0:692bf16d1455 105 /* MCPWM ------------------------------- */
todotani 0:692bf16d1455 106 //#define _MCPWM
todotani 0:692bf16d1455 107
todotani 0:692bf16d1455 108 /* CAN--------------------------------*/
todotani 0:692bf16d1455 109 //#define _CAN
todotani 0:692bf16d1455 110
todotani 0:692bf16d1455 111 /* RIT ------------------------------- */
todotani 0:692bf16d1455 112 //#define _RIT
todotani 0:692bf16d1455 113
todotani 0:692bf16d1455 114 /* EMAC ------------------------------ */
todotani 0:692bf16d1455 115 //#define _EMAC
todotani 0:692bf16d1455 116
todotani 0:692bf16d1455 117 /************************** GLOBAL/PUBLIC MACRO DEFINITIONS *********************************/
todotani 0:692bf16d1455 118
todotani 0:692bf16d1455 119 #ifdef DEBUG
todotani 0:692bf16d1455 120 /*******************************************************************************
todotani 0:692bf16d1455 121 * @brief The CHECK_PARAM macro is used for function's parameters check.
todotani 0:692bf16d1455 122 * It is used only if the library is compiled in DEBUG mode.
todotani 0:692bf16d1455 123 * @param[in] expr - If expr is false, it calls check_failed() function
todotani 0:692bf16d1455 124 * which reports the name of the source file and the source
todotani 0:692bf16d1455 125 * line number of the call that failed.
todotani 0:692bf16d1455 126 * - If expr is true, it returns no value.
todotani 0:692bf16d1455 127 * @return None
todotani 0:692bf16d1455 128 *******************************************************************************/
todotani 0:692bf16d1455 129 #define CHECK_PARAM(expr) ((expr) ? (void)0 : check_failed((uint8_t *)__FILE__, __LINE__))
todotani 0:692bf16d1455 130 #else
todotani 0:692bf16d1455 131 #define CHECK_PARAM(expr)
todotani 0:692bf16d1455 132 #endif /* DEBUG */
todotani 0:692bf16d1455 133
todotani 0:692bf16d1455 134
todotani 0:692bf16d1455 135
todotani 0:692bf16d1455 136 /************************** GLOBAL/PUBLIC FUNCTION DECLARATION *********************************/
todotani 0:692bf16d1455 137
todotani 0:692bf16d1455 138 #ifdef DEBUG
todotani 0:692bf16d1455 139 void check_failed(uint8_t *file, uint32_t line);
todotani 0:692bf16d1455 140 #endif
todotani 0:692bf16d1455 141
todotani 0:692bf16d1455 142
todotani 0:692bf16d1455 143 #endif /* LPC17XX_LIBCFG_H_ */