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

GetTickCount/GetTickCount.h

Committer:
todotani
Date:
2010-11-14
Revision:
0:692bf16d1455

File content as of revision 0:692bf16d1455:

/* mbed GetTickCount Library
  * Copyright (c) 2010 Michael Wei
  */ 
  
//shouldn't have to include, but fixes weird problems with defines
#include "LPC1768/LPC17xx.h"

#ifndef MBED_TICKCOUNT_H 
#define MBED_TICKCOUNT_H 
extern volatile unsigned int TickCount;

inline void GetTickCount_Start(void) {
    //CMSIS SYSTICK Config
    SysTick_Config(SystemCoreClock / 1000);               /* Generate interrupt every 1 ms */
}

inline void GetTickCount_Stop(void) {
    SysTick->CTRL = (1 << SYSTICK_CLKSOURCE) | (0<<SYSTICK_ENABLE) | (0<<SYSTICK_TICKINT);    /* Disable SysTick IRQ and SysTick Timer */
}

inline void GetTickCount_Reset(void) {
     SysTick->CTRL = (1 << SYSTICK_CLKSOURCE) | (0<<SYSTICK_ENABLE) | (0<<SYSTICK_TICKINT);    /* Disable SysTick IRQ and SysTick Timer */
     TickCount = 0;
     SysTick->CTRL = (1 << SYSTICK_CLKSOURCE) | (1<<SYSTICK_ENABLE) | (1<<SYSTICK_TICKINT);    /* Enable SysTick IRQ and SysTick Timer */
}

inline unsigned int GetTickCount(void)
{
    return TickCount;
}
#endif