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.

problem:why can't link some 3-dimension DMA?

hi,

i'm use of DM6467. on the EDMA3, i want to link some 3-dimension DMA, but CAN NOT! why?

this is the cfg:

  // config param
  chanParam->OPT = CSL_EDMA_OPT_MAKE(
    CSL_EDMACC_OPT_ITCCHEN_ENABLE,
    CSL_EDMACC_OPT_TCCHEN_DISABLE,
    CSL_EDMACC_OPT_ITCINTEN_DISABLE,
    CSL_EDMACC_OPT_TCINTEN_ENABLE,
    tcc,
    CSL_EDMACC_OPT_TCCMODE_NORMAL,
    CSL_EDMACC_OPT_FWID_8,
    CSL_EDMACC_OPT_STATIC_NORMAL,
    CSL_EDMACC_OPT_SYNCDIM_ABSYNC,
    CSL_EDMACC_OPT_DAM_INCR,
    CSL_EDMACC_OPT_SAM_INCR
  );
  chanParam->SRC = (Uint32)src;
  chanParam->A_B_CNT = (numLines<<16)| numBytes;
  chanParam->DST = (Uint32)dst;
  chanParam->SRC_DST_BIDX = (dstPitch<<16)|srcPitch;
  chanParam->LINK_BCNTRLD = (0x1<<16)|0x4020;
  chanParam->SRC_DST_CIDX = (dst_cIdx<<16)|src_cIdx;
  chanParam->CCNT = ccnt;

if somebody could tell, I'll be very grateful.

  • I am curious how your system is failing, are you never seeing the Linked PaRAM set get loaded?

    In your original email it looked like you had a link address of 0xFFFF which would certainly prevent linking, though it seems now you are using 0x4020 which is a valid address for parameter set 2 (0x01C04020). In general you will want to verify that the second parameter set you are trying to link is in place and valid. Also as you link address is valid the EDMA should attempt to load the PaRAM set from parameter set 2 upon completing the transfer, thus one possible reason linking would fail is if the initial transfer never completed. You may want to use a higher PaRAM set for the linked parameters such that there is no potential event going to it by default, though 2 is reserved and should be ok.

  • You should also make certain that you are not trying to link a PaRAM set to itself. For example, if your EDMA channel uses PaRAM2 you cannot link it to PaRAM2.

    Because the PaRAM is modified directly by the EDMA controller as the transfer occurs the PaRAM is no longer 'pure' after the transfer completes. So if the PaRAM links to itself then the EDMA channel will see that it has already completed and will not execute again.

  • Thanks.

    The problem is that, I can link 1-D and 2-D transmission by EDMA or QDMA, they are working well. But, 3-D transmission by EDMA can not be linked, I want to know the reason. Is 3-D transmission different with 1-D and 2-D transmission except multi-frame? Further more, if not link, 3-D transmission can be used by EDMA. But, It can not be used by QDMA? why?

    This is the configure demo:

    chanParam2 = 0x01c04040;

    chanParam1 = 0x01c04020;

      chanParam2->OPT = CSL_EDMA_OPT_MAKE(
        CSL_EDMACC_OPT_ITCCHEN_ENABLE,
        CSL_EDMACC_OPT_TCCHEN_DISABLE,
        CSL_EDMACC_OPT_ITCINTEN_DISABLE,
        CSL_EDMACC_OPT_TCINTEN_DISABLE,
        0,
        CSL_EDMACC_OPT_TCCMODE_NORMAL,
        CSL_EDMACC_OPT_FWID_8,
        CSL_EDMACC_OPT_STATIC_NORMAL,
        CSL_EDMACC_OPT_SYNCDIM_ABSYNC,
        CSL_EDMACC_OPT_DAM_INCR,
        CSL_EDMACC_OPT_SAM_INCR
      );
      chanParam2->SRC = (Uint32)SRC_ADDRESS;
      chanParam2->A_B_CNT = (16<<16)| 16;
      chanParam2->DST = (Uint32)SRC_ADDRESS;
      chanParam2->SRC_DST_BIDX = 16<<16 | recFrmWidthY;
      chanParam2->LINK_BCNTRLD = (0x1<<16)| 0xffff;
      chanParam2->SRC_DST_CIDX = 0x500<<16 | 16;
      chanParam2->CCNT = 0x10;

      chanParam1->OPT = CSL_EDMA_OPT_MAKE(
        CSL_EDMACC_OPT_ITCCHEN_ENABLE,
        CSL_EDMACC_OPT_TCCHEN_DISABLE,
        CSL_EDMACC_OPT_ITCINTEN_DISABLE,
        CSL_EDMACC_OPT_TCINTEN_ENABLE,
        0,
        CSL_EDMACC_OPT_TCCMODE_NORMAL,
        CSL_EDMACC_OPT_FWID_8,
        CSL_EDMACC_OPT_STATIC_STATIC,
        CSL_EDMACC_OPT_SYNCDIM_ABSYNC,
        CSL_EDMACC_OPT_DAM_INCR,
        CSL_EDMACC_OPT_SAM_INCR
      );
      chanParam1->SRC = (Uint32)src;
      chanParam1->A_B_CNT = (8<<16)| 24;
      chanParam1->DST = (Uint32)dst;
      chanParam1->SRC_DST_BIDX = (24<<16)| frmWidthY;
      chanParam1->LINK_BCNTRLD = (0x1<<16)|((Uint32)chanParam2 & 0xffff);
      chanParam1->SRC_DST_CIDX = 0x500<<16 | 24;
      chanParam1->CCNT = 0x10;

    Thanks.

  • In your original post you mentioned wanting to link a 3D transfer.  Did you mean CHAIN a 3D transfer.  That is, are you trying to have a single sync event cause the entire transfer (ACNT * BCNT * CCNT bytes)?  If so, I see you have correctly enabled ITCCHEN in the OPT register, but it's not clear what value you programmed into TCC.  The value of TCC must be the channel number to which you are chaining.  In your case it would be chaining to itself.

    If you really did use the correct term, link, then what sort of problem are you having with the link?  The expected behavior is that after all ACNT * BCNT * CCNT bytes have been trasferred then the Parameter Set pointed to by your link value would be copied over the parameter set of your channel.

  • These new parameter sets have the link to null address in them, so that would explain why linking would not do anything, perhaps as Brad suggested you mean to chain the transfers.

    Another thought to keep in mind is that one difference between 2d and 3d transfers is how the event synchronization works, you currently have AB-sync enabled, so that means you would need to have CCNT events driving the EDMA channel in order for the PaRAM to be exhausted and link to the next PaRAM set (if you do mean to link). If you had AB-sync enabled with a 2d transfer than it would mean you could finish the PaRAM set with just one event, perhaps this is the condition you are seeing?

  • I also use EDMA3 base on DM6467,but Idon't know how to use it ,could you give something help?    I'm gratedful.

    And I'm deverloping DSP's algorithms on DVSDK_1_4.. based on Linux.  Thank you! 

    email: xcaids@163.com