Part Number: AWR1843
Tool/software: Code Composer Studio
I use hwa to do doppler fft in MRR project, when hwa completed the doppler fft, I use EDMA transfer the data out, but the code can't go to the transfercompletioncallback.
then I test the EDMA configuration, I configure an arry source_arry[1024] to be source address,and set all to 0;then an other arry dest_arry[1024] to be dest address, and set it all to be 1.
then start the EDMA transfer, but the first element in dest_arry[1024] is still 1,other element is 0.
how can I get the correct result?
my code as follows :
errorCode = EDMAutil_configHwaContiguous(handle,
MRR_SF0_EDMA_2D_PING_CH_ID, //chId,
true, //isEventTriggered
MRR_SF0_2D_PING_SHADOW_LINK_CH_ID1, //linkChId,
MRR_SF0_2D_PING_CHAIN_CH_ID2, //chainChId,
(uint32_t*)(SOC_translateAddress((uint32_t)source_arry,SOC_TranslateAddr_Dir_TO_EDMA,NULL)), //*pSrcAddress,
(uint32_t*) SOC_translateAddress((uint32_t)dest_arry, SOC_TranslateAddr_Dir_TO_EDMA,NULL), //*pDestAddress,
128*4, // numBytes,
8,//obj->numRangeBins/(2*MMW_NUM_RANGE_BINS_PER_TRANSFER), //numBlocks,
0, //srcIncrBytes,
0, //dstIncrBytes,
true, //isIntermediateChainingEnabled,
false, //isFinalChainingEnabled,
false, //isTransferCompletionEnabled
NULL, //transferCompletionCallbackFxn
NULL);
int32_t EDMAutil_configHwaContiguous(EDMA_Handle handle,
uint8_t chId,
bool isEventTriggered,
uint8_t linkChId,
uint8_t chainChId,
uint32_t * pSrcAddress,
uint32_t * pDestAddress,
uint16_t numBytes,
uint16_t numBlocks,
uint16_t srcIncrBytes,
uint16_t dstIncrBytes,
bool isIntermediateChainingEnabled,
bool isFinalChainingEnabled,
bool isTransferCompletionEnabled,
EDMA_transferCompletionCallbackFxn_t transferCompletionCallbackFxn,
uintptr_t transferCompletionCallbackFxnArg)
{
EDMA_channelConfig_t config;
int32_t errorCode = EDMA_NO_ERROR;
config.channelId = chId;
config.channelType = (uint8_t)EDMA3_CHANNEL_TYPE_DMA;
config.paramId = chId;
config.eventQueueId = 0;
config.paramSetConfig.sourceAddress = (uint32_t) pSrcAddress;
config.paramSetConfig.destinationAddress = (uint32_t) pDestAddress;
config.paramSetConfig.aCount = numBytes;
config.paramSetConfig.bCount = numBlocks;
config.paramSetConfig.cCount = 1;
config.paramSetConfig.bCountReload = 0;//config.paramSetConfig.bCount;
config.paramSetConfig.sourceBindex = srcIncrBytes;
config.paramSetConfig.destinationBindex = dstIncrBytes;
config.paramSetConfig.sourceCindex = 0;
config.paramSetConfig.destinationCindex = 0;
config.paramSetConfig.linkAddress = EDMA_NULL_LINK_ADDRESS;
config.paramSetConfig.transferType = (uint8_t)EDMA3_SYNC_A;
config.paramSetConfig.transferCompletionCode = chainChId;
config.paramSetConfig.sourceAddressingMode = (uint8_t) EDMA3_ADDRESSING_MODE_LINEAR;
config.paramSetConfig.destinationAddressingMode = (uint8_t) EDMA3_ADDRESSING_MODE_LINEAR;
/* don't care because of linear addressing modes above */
config.paramSetConfig.fifoWidth = (uint8_t) EDMA3_FIFO_WIDTH_8BIT;
config.paramSetConfig.isStaticSet = false;
config.paramSetConfig.isEarlyCompletion = false;
config.paramSetConfig.isFinalTransferInterruptEnabled =
isTransferCompletionEnabled;
config.paramSetConfig.isIntermediateTransferInterruptEnabled = false;
config.paramSetConfig.isFinalChainingEnabled =
isFinalChainingEnabled;
config.paramSetConfig.isIntermediateChainingEnabled =
isIntermediateChainingEnabled;
config.transferCompletionCallbackFxn = transferCompletionCallbackFxn;
if (transferCompletionCallbackFxn != NULL) {
config.transferCompletionCallbackFxnArg = transferCompletionCallbackFxnArg;
}
if ((errorCode = EDMA_configChannel(handle, &config, isEventTriggered)) != EDMA_NO_ERROR)
{
//System_printf("Error: EDMA_configChannel() failed with error code = %d\n", errorCode);
MmwDemo_dssAssert (0);
goto exit;
}
errorCode = EDMA_setup_shadow_link(handle, chId, linkChId,
&config.paramSetConfig, config.transferCompletionCallbackFxn, transferCompletionCallbackFxnArg);
exit:
return(errorCode);
}