Hi,
My setup :
C6678 EVM, CCS 5.1.1.00031, Compiler v3.3, mcsdk_2_00_05_17, pdk_C6678_1_0_0_17, edma3_lld_02_11_03_02
Background :
I've been playing around EDMA3 for a few days now.
I've successfully tested the edma_test.c examples that comes with the CSL.
I've also tested several simple cases that worked well such as : simple block transfer using global regions, simple block transfer using shadow regions, chained block transfer with shadow regions, 2D block transfer.
My problem :
I'm now trying to do the 'Breaking Up Large Transfers with Intermediate Chaining' of p99/173 of the EDMA3 controller guide
I want to transfer 10240 short elements (2bytes) as 10*1024 transfers. These elements are in external memory and will be transfered to L2 memory
Right now, only the first transfer of 1024 elements works, the self-chaining doesn't work
I use the instance 1, channel 1, shadow region 5
myParamSetup is as follows :
myParamSetup.option = CSL_EDMA3_OPT_MAKE( CSL_EDMA3_ITCCH_EN, \
CSL_EDMA3_TCCH_DIS, \
CSL_EDMA3_ITCINT_DIS, \
CSL_EDMA3_TCINT_EN, \
channelNum, \
CSL_EDMA3_TCC_NORMAL, \
CSL_EDMA3_FIFOWIDTH_NONE, \
CSL_EDMA3_STATIC_DIS, \
CSL_EDMA3_SYNC_A, \
CSL_EDMA3_ADDRMODE_INCR, \
CSL_EDMA3_ADDRMODE_INCR
);
Additionnal info : channelNum = 1, ITCCH_EN because I want the self chaining,
TCCH_DIS because it's a one time transfer, TCINT_EN
because at the end of the 10 transfers I want to poll regionIntr.intr & (1<<channelNum) to know when it's finished.
myParamSetup.srcAddr = (Uint32)block_src;
myParamSetup.aCntbCnt = CSL_EDMA3_CNT_MAKE(ACNT,BCNT);
myParamSetup.dstAddr = (Uint32)block_dst + L2Offset; // global adress
myParamSetup.srcDstBidx = CSL_EDMA3_BIDX_MAKE(SRCBIDX,DSTBIDX); // 0,0 in this case
myParamSetup.linkBcntrld= CSL_EDMA3_LINKBCNTRLD_MAKE(CSL_EDMA3_LINK_NULL,0);
myParamSetup.srcDstCidx = CSL_EDMA3_CIDX_MAKE(0,0);
myParamSetup.cCnt = CCNT;
with
#define TYPE_BYTE_SIZE 2 //using 'short'
#define NB_ELEMENTS_PER_TRANSFER 1024
#define NB_TRANSFERS 10
#define ACNT (NB_ELEMENTS_PER_TRANSFER*TYPE_BYTE_SIZE)
#define BCNT NB_TRANSFERS
#define CCNT 1
#define SRCBIDX 0 // default
#define DSTBIDX 0
and
coreNum = 0;
L2Offset = 0x10000000 + coreNum*0x01000000;
I also have in my cmd file
.block_src_DATA : > 0x80000000 // source in external memory
.block_dst_DATA : > 0x00800000 // destination in L2 memory
with block_src and block_dst of 10240 size.
It is supposed to work like this :
"Upon completion of the first array, intermediate transfer complete code chaining
generates a synchronization event to channel 1, a value specified by the TCC field.
This intermediate transfer completion chaining event causes EDMA3 channel 1 to transfer the next array"
but it seems like it doesn't decrement BCNT and only do it once. It doesn't self-chain.
Can you explain to me what I'm doing wrong ?
I can provide the files if needed.
Thank you,
CM