This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

66AK2L06: AB-synchronized 3D transfer using EDMA3

Part Number: 66AK2L06

Hi !

I need to copy a large block of data - 1.125 Gbyte. I'm using EDMA3, configuring AB-synchronized 3D transfer. I have an array with 301989888 uint elements.

So, ACNT = 4;  //size of each element

BCNT = 6144; //number of elements in 1 frame

CCNT = 49152; // number of frames

bSrcIdx = ACNT;

bDstIdx =ACNT;

cDstIdx = ACNT * BCNT;

cDstIdx = ACNT * BCNT;

Then I start the transfer manually in cycle with CCNT iterations. I check for ending of the transfer using EDMA3_DRV_waitAndClearTcc(). But the program running in EDMA3_DRV_waitAndClearTcc() forever. If I pause the program and look in memory, I will see that the transfer is finished by 60-70 %. The number of percents is different for differents executions, but near 60-70%. So, I don't know what does it mean and why this happens.

For very small blocks (for example 56 elements) 3D transfer works correct. But even for 160000 elements it doesn't work, transfer freezes on 60-70%.

I have no ideas why transfer doesn't finish. Please, help..

Kind Regards,

Kirill

  • Hi,

    Several things to checks:

    1.  >>>>>>a large block of data - 1.125 Gbyte.>>>>>>>> I have an array with 301989888>>>>>>>

    So, ACNT = 4;  //size of each element

    BCNT = 6144; //number of elements in 1 frame

    CCNT = 49152; // number of frames

    To best use the EDMA, it is good to set ACNT = 128 or 64, that is the DBS (data burst size) of the EDMA transfer controller, although ACNT=4 should work, it is not efficient.

    2. You used CCNT=49152, will change this to anything less than 32768 work for 100% transfer completion? I knew ACNT, BCNT, CCNT can be 0 to 65535, but I met some issues in the past for BCNT over 32768, only partially transmitted (didn't debug further). So I am not sure if CCNT > 32768 in your case caused any issue?

    3. How do you know the transfer didn't finish? For example, look at the memory from CCS or check with the code (you need to do cache invalidate after EDMA transfer, or look at the non-cache view) or the IPR/IPRH didn't set?

    4. If transfer stuck, do you see any error in ERRSTAT and ERRDET registers?

    5. >>>>>>>But even for 160000 elements it doesn't work, transfer freezes on 60-70%.>>>>>>> Let's focus on this smaller transfer. What is the ACNT, BCNT, CCNT settings? Or you can share the PaRamSet programmed for this transfer? In most tests, we use CCNT=1, ACNT * BCNT is already big enough for a typical transfer. I am sure that we did transfer size of several MB without any issue. Will CCNT=1 works for this?

    6. For 160,000 x 4 = 640KB transfer, this is very small, if you change the SRC, DST (like L2, MSMC or DDR3) and EDMA channel controllers or transfer controllers, do they all fail?

    Regards, Eric

  • Hi,

    Thanks a lot for your reply!

    1. Thank you for the advice. I'll keep that in mind.

    2. I tried to use CCNT<32768. The transfer didn't end also..

    3. For looking at the memory I use memory browser in CCS and non-cached memory.

    4. ERRSTAT = 0x00000008; ERRDET = 0x00000000.

    5. For 160000 elements I used : ACNT = 4; BCNT = 400; CCNT = 400; Transfers of different sizes of data (for example even for 500Mb) works correctly for CCNT = 1.

    6. It doesn't depend on it. And I need 1.125 Gb transfer, so I can't use L2, MSMC, only DDR3.

    Do you have any other ideas?

    Regards, Kirill

  • Hi,

    >>>>>ERRSTAT = 0x00000008; ERRDET = 0x00000000.>>>>> This didn't provide any useful information.

    So you verified that when CCNT=1, there is no issue to transfer a big block even 500Mb. How do you trigger the next transfer if CCNT > 1? It looks CCNT > 1 stuck in the middle.

    If ACNT = 0x6000 and BCNT= 0x6000 works in your case, it can transmit 576MB already, will a linked transfer work for your purpose (you can use 2 linked together with CCNT=1 for 1.125GB)?

    Regards, Eric  

  • Hi,

    Thank you for activity:)

    I trigger next transfer manually, using a cycle with CCNT iterations.

    I've already thought about linked 2D transfers. What do you think will be faster: two linked 2D transfers, or 3D transfer?

    Regards, Kirill

  • Hi,

    >>>>two linked 2D transfers, or 3D transfer.>>>>I thought the speed would be the same. You need to make ACNT integer multiple of 128 or 64. The speed will be impacted by which EDMA CC and TC used, not because of 2 linked 2D or 1 3D transfer.

    Regards, Eric 

  • Ok, thank you very much!! I’ll try linked 2D transfer.

    Kind Regards, Kirill