Hi,
I want to use EDMA3 for transmitting data with UART on 6678 EVM. I am working with CCS Version: 5.3.0.00067, mcsdk_02_01_02_05 and edma3_lld_02_11_05_02.
First of all I worked on example code in dma_test.c given with EDMA3 LLD. I could transfer data from source to destination buffer successfully. Then I changed the code for UART EDMA3 transfer.
- I used instance 2 and channel number 41 of EDMA3, based on Table 7-37 of the C6678 data manual but EDMA3_DRV_requestChannel() function returned with error EDMA_DRV_E_DMA_CHANNEL_UNAVAIL (-132) when called with EDMA3_DRV_HW_CHANNEL_EVENT_41. Then I understand from the earlier post http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/164561.aspx that I should modify “sampleInstInitConfig” structure, ownPaRAMSets, ownDmaChannels and ownTccs values for EDMA3 INSTANCE# 2, region 0 in sample_c6678_cfg.c to enable channel 41. The modified values are shown below:
/* ownPaRAMSets */
/* 31 0 63 32 95 64 127 96 */
{0x00000000u, 0x00030200u, 0xFFFFFFFFu, 0x00FFFFFFu,
/* 159 128 191 160 223 192 255 224 */
0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,
/* 287 256 319 288 351 320 383 352 */
0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,
/* 415 384 447 416 479 448 511 480 */
0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,},
/* ownDmaChannels */
/* 31 0 63 32 */
{0x00000000u, 0x00030200u},
/* ownTccs */
/* 31 0 63 32 */
{0x00000000u, 0x00030200u},
I build the “edma3_lld_drv_sample.ae66” library and solved the problem.
- I changed the trig mode parameter of function EDMA3_DRV_enableTransfer() with EDMA3_DRV_TRIG_MODE_EVENT but the function returned with EDMA3_DRV_E_INVALID_PARAM (-139). Then I noticed that in sample_c6678_cfg.c file DMA channel 41 of instance 2 is not mapped to any hardware event and modified “sampleEdma3GblCfgParams” structure, dmaChannelHwEvtMap field value as shown below:
/**
* \brief Mapping of DMA channels to Hardware Events from
* various peripherals, which use EDMA for data transfer.
* All channels need not be mapped, some can be free also.
*/
{
0xFFFFFFFFu,
0xFFFF0F00u
}
I rebuild the “edma3_lld_drv_sample.ae66” library and the function now returns value 0 (EDMA3_DRV_SOK) however does not transfer any data from UART using EDMA3.
Are these modifications correct or not?
I am also sending you my code in the attachment. You can see the UART initializations and EDMA3 settings that I have done. Please let me know if anything is missing or wrong.
Thanks,
Cigdem