Hello,guys!
i have problems with MDMA transfer.
I take MDMA CrossCore example project ,and do changes towards ARM direction of data flow. So initialisation is the same(MCAPI addresses and SID of interrupt).
I have complex problem with it:
1. When i run project on debug with ICE-1000,and run DSP core sending data with MDMA, ARM core does not trigger. But when i do step by step execution of MDMA sending ARM core triggers, i can see data in DDR ARM zone buffer etc
2. When i run both cores eventually i get ard fault error
Enabled interrupt with ID (IID) 0x7fffffff raised when it has no handler registered.
Here is code snippets from project:
MDMA open in DSP proj:
ADI_DMA_RESULT eResult = ADI_DMA_SUCCESS; //************************************************************************* // Open MDMA channel //************************************************************************* DBG_MSG ( "Core1: Opening MDMA channel\n"); eResult = adi_mdma_Open (MEMCOPY_STREAM_ID, &MemDmaStreamMem[0], &hMemDmaStream, &hSrcDmaChannel, &hDestDmaChannel, NULL, NULL); if (eResult != ADI_DMA_SUCCESS) { DBG_MSG ("Failed to open MDMA stream, Error Code: 0x%08X\n", eResult); return ARM_LINK_ERROR; } //************************************************************************* // Configure MDMA channel //************************************************************************* adi_mdma_EnableChannelInterrupt (hDestDmaChannel, false, false); // Disable the MDMA destination transfer complete interrupt adi_mdma_GetChannelSID (hDestDmaChannel, &nSid_SHARC1_Master); // Get the channel SID for the MDMA destination complete interrupt /*add sharc int offset*/ //adi_sec_SetPriority(nSid_SHARC1_Master,ADI_SEC_MAX_INT_PRIO); nSid_SHARC1_Master += SHARC_INT_OFFSET; //adi_sec_SetCoreID (nSid_SHARC1_Master, ADI_SEC_CORE_0); adi_mdma_EnableChannelInterrupt (hSrcDmaChannel, true, true); // Enable the MDMA source transfer complete interrupt DBG_MSG ( "\n Destination Channel interrupt SID: \t%08X\n ", (unsigned int) nSid_SHARC1_Master); #if 1 eResult = adi_dma_UpdateCallback (hSrcDmaChannel, MemDmaCallback, hMemDmaStream); // Register source transfer complete interrupt /* IF (Failure) */ if (eResult != ADI_DMA_SUCCESS) { DBG_MSG ("Failed to set DMA callback, Error Code: 0x%08X\n",eResult); return ARM_LINK_ERROR; } #endif
install interrupt on ARM slave:
adi_int_InstallHandler (nSID_SHARC_Master, DataTransferFromSHARCComplete, NULL, true);
I can see that MCAPI send me proper interrupt SID(with offset for ARM)
Callback on ARM with RTOS:
void DataTransferFromSHARCComplete(uint32_t SID, void *pCBParam){ // Save the CPU registers CPU_SR_ALLOC(); // Protect a critical section CPU_CRITICAL_ENTER(); // Make the kernel aware that // the interrupt has started OSIntEnter(); CPU_CRITICAL_EXIT(); // Handle the interrupt static uint32_t test=0; test= BufferFromSHARC1[0]; BufferFromSHARC1[0]=0; // Make the kernel aware that // the interrupt has ended OSIntExit();}
What i am missing? help me please.
Moving to CrossCore Embedded Studio and Add-ins
Hi,Could you please share us the project and for brief explanation of your application. This will help us to assist you betterBest regards,Santha kumari.K
Hello!see attached8371.jjj_.rar
Application should send and receive data from PC over UDP connection -working standalone
After ARM core receives data it should be processed to DSP core1 -also working standalone, i can send data to L1
After DSP do some and send back data to ARM over MDMA,and ARM send it back to PC over UDP --here i get crashes
Right now on debug purposes there is no data send from ARM to DSP
Only from DSP to ARM, randomly generated. After i try to send it to PC, i always get crash with 0x7ffffff IID interrupt has no handler.
Hello,
We are working on this issue. We will get back you soon.
Regards,Santha kumari.K