Dependencies:   mbed-dsp mbed

Fork of DSP_200kHz by Mazzeo Research Group

Revision:
50:33524a27e08c
Parent:
49:4dcf4717a8bb
Child:
51:43143a3fc2d7
--- a/dma.cpp	Sat Jan 31 19:16:22 2015 +0000
+++ b/dma.cpp	Sat Jan 31 19:46:00 2015 +0000
@@ -3,8 +3,6 @@
  */
 #include "dma.h"
 
-Serial debug3(USBTX,USBRX);
-
 #define TOTAL_SAMPLES 10
 int len = TOTAL_SAMPLES;
 uint16_t sample_array0[TOTAL_SAMPLES];
@@ -42,7 +40,7 @@
     // Set memory address for source and destination for DMA0, DMA1, and DMA2
     DMA_TCD0_SADDR = (uint32_t) &ADC0_RB;
     DMA_TCD0_DADDR = (uint32_t) sample_array0;
-    DMA_TCD1_SADDR = (uint32_t) &ADC1_RB;
+    DMA_TCD1_SADDR = (uint32_t) &ADC1_RA;
     DMA_TCD1_DADDR = (uint32_t) sample_array1;
     DMA_TCD2_SADDR = (uint32_t) &FTM2_CNT;
     DMA_TCD2_DADDR = (uint32_t) angle_array;
@@ -89,21 +87,21 @@
     DMA_TCD2_CSR = 0;
     
     
-    debug3.printf("DMA_CR: %08x\r\n", DMA_CR);
-    debug3.printf("DMA_ES: %08x\r\n", DMA_ES);
-    debug3.printf("DMA_ERQ: %08x\r\n", DMA_ERQ);
-    debug3.printf("DMA_EEI: %08x\r\n", DMA_EEI);
-    debug3.printf("DMA_CEEI: %02x\r\n", DMA_CEEI);
-    debug3.printf("DMA_SEEI: %02x\r\n", DMA_SEEI);
-    debug3.printf("DMA_CERQ: %02x\r\n", DMA_CERQ);
-    debug3.printf("DMA_SERQ: %02x\r\n", DMA_SERQ);
-    debug3.printf("DMA_CDNE: %02x\r\n", DMA_CDNE);
-    debug3.printf("DMA_SSRT: %02x\r\n", DMA_SSRT);
-    debug3.printf("DMA_CERR: %02x\r\n", DMA_CERR);
-    debug3.printf("DMA_CINT: %02x\r\n", DMA_CINT);
-    debug3.printf("DMA_INT: %08x\r\n", DMA_INT);
-    debug3.printf("DMA_ERR: %08x\r\n", DMA_ERR);
-    debug3.printf("DMA_HRS: %08x\r\n", DMA_HRS);
+    /*pc.printf("DMA_CR: %08x\r\n", DMA_CR);
+    pc.printf("DMA_ES: %08x\r\n", DMA_ES);
+    pc.printf("DMA_ERQ: %08x\r\n", DMA_ERQ);
+    pc.printf("DMA_EEI: %08x\r\n", DMA_EEI);
+    pc.printf("DMA_CEEI: %02x\r\n", DMA_CEEI);
+    pc.printf("DMA_SEEI: %02x\r\n", DMA_SEEI);
+    pc.printf("DMA_CERQ: %02x\r\n", DMA_CERQ);
+    pc.printf("DMA_SERQ: %02x\r\n", DMA_SERQ);
+    pc.printf("DMA_CDNE: %02x\r\n", DMA_CDNE);
+    pc.printf("DMA_SSRT: %02x\r\n", DMA_SSRT);
+    pc.printf("DMA_CERR: %02x\r\n", DMA_CERR);
+    pc.printf("DMA_CINT: %02x\r\n", DMA_CINT);
+    pc.printf("DMA_INT: %08x\r\n", DMA_INT);
+    pc.printf("DMA_ERR: %08x\r\n", DMA_ERR);
+    pc.printf("DMA_HRS: %08x\r\n", DMA_HRS);*/
 }
 
 void dma_reset() {