I want to set up a basic EDMA transfer to copy from one memory location to another. I do not need chaining, automatic triggering, multiple parameter sets, etc. Just a basic transfer using a manual start. I have watched the videos located at training.ti.com/using-c6000-edma3-part-2-14-15, and the documentation at file:///C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/edma/docs/doxygen/html/index.html. While they give an overview of the many capabilities, I am still confused as to how to set up the configuration for just a basic transfer.
I have the following as a start to try copying from one variable to another:
static uint32_t test_destination;
{
int32_t errorCode = EDMA_NO_ERROR;
EDMA_Handle handle = obj->edmaHandle;
EDMA_channelConfig_t config;
HWA_SrcDMAConfig dmaConfig;
test_destination = 0;
config.channelType = (uint8_t)EDMA3_CHANNEL_TYPE_DMA;
config.paramId = 30;
config.eventQueueId = 0;
config.paramSetConfig.destinationAddress = (uint32_t) &test_destination;
config.paramSetConfig.bCount = 1;
config.paramSetConfig.cCount = 1;
config.paramSetConfig.bCountReload = config.paramSetConfig.bCount;
config.paramSetConfig.destinationBindex = 0;
config.paramSetConfig.destinationCindex = 0;
config.paramSetConfig.transferType = (uint8_t)EDMA3_SYNC_A;
config.paramSetConfig.transferCompletionCode = 0;
config.paramSetConfig.sourceAddressingMode = (uint8_t) EDMA3_ADDRESSING_MODE_LINEAR;
config.paramSetConfig.destinationAddressingMode = (uint8_t) EDMA3_ADDRESSING_MODE_LINEAR;
config.paramSetConfig.fifoWidth = (uint8_t) EDMA3_FIFO_WIDTH_8BIT;
config.paramSetConfig.isEarlyCompletion = false;
config.paramSetConfig.isFinalTransferInterruptEnabled = false;
config.paramSetConfig.isIntermediateTransferInterruptEnabled = false;
config.paramSetConfig.isFinalChainingEnabled = false;
config.paramSetConfig.isIntermediateChainingEnabled = false;
config.transferCompletionCallbackFxn = NULL;
config.transferCompletionCallbackFxnArg = MMWDEMO_EDMA_TRANSFER_COMPLETION_CODE_CFAR_DONE;
{
System_printf("Error: EDMA_configChannel() failed with error code = %d\n", errorCode);
goto exit;
}
return(errorCode);
}
It is unclear to me what to put in for the config.paramid field when I want to use the configuration in the config structure and not a separate parameter set. Is the rest of the configuration appropriate? Are there any code examples of setting up a basic manual transfer?
Thanks,