PASDK150: Workaround for UART timeout due to Hwi_disable().
authorChitresh Gupta <chitresh.g@pathpartnertech.com>
Tue, 3 Jan 2017 09:16:45 +0000 (14:46 +0530)
committerChitresh Gupta <chitresh.g@pathpartnertech.com>
Tue, 3 Jan 2017 09:16:45 +0000 (14:46 +0530)
pasdk/test_dsp/sap/sap.c

index 65d47dd9bce4cbbfead35cc935075b4b64eacd0d..0b68afa1a342ca1af495e46f5973ea356be0f93d 100644 (file)
@@ -822,9 +822,11 @@ Int SAP_reclaim (DEV2_Handle device)
                //note: size here is in # of bytes, so incrementing by 4X32b words ( or 8X16b)
                        //for(i=0; i<(pFrame->size)/(4*4); i+=16)
                        //{
-               oldMask = Hwi_disable ();
+                // Hwi_disable commented since it used to affect other interrupts
+                // max HWI disable duration ~1ms observed
+                   //oldMask = Hwi_disable ();
                                swapHdmi(pFrame->addr, pFrame->size);
-                               Hwi_restore(oldMask);
+                               //Hwi_restore(oldMask);
 
                        Cache_wb (pFrame->addr, pFrame->size, Cache_Type_ALL, 0);
                        Cache_wait();
@@ -1158,7 +1160,9 @@ Void SAP_watchDog (Void)
 
     // protect context
     Task_disable (); // needed since we may call SEM_post
-    oldMask = Hwi_disable ();
+    // Hwi_disable commented since it used to affect other interrupts
+    // max HWI disable duration ~4ms observed
+    //oldMask = Hwi_disable ();
 
     //TRACE_VERBOSE((&TR_MOD, "%s.%d: devices loop, numDevices = %d", __FUNCTION__, __LINE__, dapDrv.numDevices));
 
@@ -1199,7 +1203,7 @@ Void SAP_watchDog (Void)
     // renable interrupts and task manager.
     // If we posted to the semaphore then the TSK_enable call will lead to
     // an immediate task switch to the associated audio thread.
-    Hwi_restore (oldMask);
+    //Hwi_restore (oldMask);
     Task_enable ();
 
 } // SAP_watchDog