[processor-sdk/pdk.git] / packages / ti / drv / mibspi / test / loopback / src / mibspi_test_common.c
diff --git a/packages/ti/drv/mibspi/test/loopback/src/mibspi_test_common.c b/packages/ti/drv/mibspi/test/loopback/src/mibspi_test_common.c
index d120c5f51106797f71d238968f0aa29212832937..8d60b4c6637fcd9916bae6044e7891c7128a0e13 100644 (file)
}
#ifdef MIBSPI_DMA_ENABLE
-uint32_t gTestCallbackDone = 0;
+volatile uint32_t gTestCallbackDone = 0;
void Test_loopback_callbackFxn (MIBSPI_Handle handle,
MIBSPI_Transaction * transaction)
@@ -464,6 +464,15 @@ static int32_t Test_spiLoopback_callback(const MIBSPI_Handle handle, uint8_t sla
while (gTestCallbackDone == 0)
{
/* waiting for the callback funciton to be called. */
+ /* Need Nop so that interrupts get enabled atleast for a few cycles in C66x case */
+ asm(" nop ");
+ asm(" nop ");
+ asm(" nop ");
+ asm(" nop ");
+ asm(" nop ");
+ asm(" nop ");
+ asm(" nop ");
+ asm(" nop ");
}
/* Check data integrity */
if (memcmp((void *)txBuf, (void *)rxBuf, len) != 0)