Dependencies:   mbed-dsp mbed

Fork of DSP_200kHz by Mazzeo Research Group

Revision:
39:82dc3daecf32
Parent:
37:8bdc71f3e874
Child:
40:bd6d8c35e822
--- a/dma.cpp	Wed Jan 28 04:56:07 2015 +0000
+++ b/dma.cpp	Thu Jan 29 16:18:54 2015 +0000
@@ -16,7 +16,7 @@
  * @len = the length of array1 and array2, and the number of reads the DMA completes
  * */
  
-void dma_init(uint16_t* array0, uint16_t* array1, uint16_t* array2, int len)
+void dma_init(uint16_t* array0, uint16_t* array1, uint16_t* array2, int len, Serial &pc)
 {
     // select round-robin arbitration priority
     DMA_CR |= DMA_CR_ERCA_MASK;
@@ -81,4 +81,20 @@
     DMA_TCD0_CSR = 0;
     DMA_TCD1_CSR = 0;
     DMA_TCD2_CSR = 1;
+    
+    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);
 }