DMA issue to be tested

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE by shubham c

Revision:
191:0636c8391407
Parent:
182:8b73c010286b
Child:
192:f0d5fde60221
diff -r 1140091f5cec -r 0636c8391407 ThreadsAndFunctions.h
--- a/ThreadsAndFunctions.h	Sun Jun 26 12:46:51 2016 +0000
+++ b/ThreadsAndFunctions.h	Tue Jun 28 08:22:08 2016 +0000
@@ -4,6 +4,10 @@
     gSCIENCE_THREAD->signal_set(SCIENCE_SIGNAL);
 }
 
+void payload_isr_fun_dma(void const *args ){
+    gSCIENCE_THREAD->signal_set(SCIENCE_SIGNAL);
+}
+RtosTimer PL_wo_dma(payload_isr_fun_dma, osTimerPeriodic,(void * )NULL);
 void SCIENCE_FUN(void const *args){
     
     // initialisation of payload spi
@@ -105,6 +109,7 @@
             gFLAGS = gFLAGS & (~UART_INT_FLAG);
             if( !(gFLAGS & COM_SESSION_FLAG) ){
                 // PENDING : DISABLE THREADS
+                PL_wo_dma.stop();
                 gFLAGS = gFLAGS | COM_SESSION_FLAG;
                 gSESSION_TIMEOUT.attach(&after_session, SESSION_TIME_LIMIT);
                 gFLAGS = gFLAGS | COM_RX_FLAG;
@@ -291,6 +296,7 @@
             COM_POWER_OFF_TX;
             reset_all;
             // PENDING : ENABLE THREADS
+            PL_wo_dma.start(6000);
             gSESSION_TIMEOUT.detach();
             gFLAGS = gFLAGS & (~COM_SESSION_FLAG);
         }