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.

TDA4VM: TDA4VM: Questions regarding DMA (DRU)

Part Number: TDA4VM

Team,
Can you please help with the below urgently.
The question was posted already here but never got answered.
It is critical for customer to understand how to program the DMA to move forward:

"I studied the DMA section in TRM, the example code of UDMA driver lib and the PDFs in the subfolder doc. However I have some questions left:

Q1: In TRM at Table 10-52. FLAGS Field Descriptions: There are different TYPES descriptions. What is the difference between a x-dimensional data move, versus a x-dimensional block move?

Q2: Given following use case: There are 4 distinct memory source regions (S1, S2, S3, S4), which have to be copied to their corresponding destination memory regions (D1, D2, D3, D4), whenever the source has new data.
There is a periodical check (every 50 us) to find out which source region has new data.

Following illustrates a possible flow:

1. Timer_ISR(50us)
2. Check S1-S4
3. Result: S1, S3, S4 are updated and should get copied
4. Copy S1, S3, S4 to D1, D3, D4
5. TR Complete

6. Timer_ISR(50us)
7. Check S1-S4
8. Result: S1 updated and should get copied
9. Copy S1
10. TR Complete

My question is here, how to configure DMA structures to handle this case efficiently. I would like to use the DRU.

Q2.1: Is a single channel sufficient?

Q2.2: Do I need a descriptor capacity of 1 or more?

Q2.3: I guess, depending on which source memories has to be copied, I create a Transfer Request Descriptor, which consists of a single/multiple Transfer Requests for each memory copy necessary? Is this possible?

Q3: In drv/udma/examples/udma_dru_test/udma_dru_test.c function "App_udmaTrpdInit": Line 575, there is a cast to type CSL_UdmapTR15. I think this means "Transfer Request Type 15". At Line 580, there is a function call with argument "UDMA_TR_TYPE_9" which I think means "Transfer Request Type 9".
Why are there used different types? Is that correct?

static void App_udmaTrpdInit(Udma_ChHandle chHandle,
                             uint8_t *pTrpdMem,
                             const void *destBuf,
                             const void *srcBuf,
                             uint32_t length)
{
    CSL_UdmapCppi5TRPD *pTrpd = (CSL_UdmapCppi5TRPD *) pTrpdMem;
    CSL_UdmapTR15 *pTr = (CSL_UdmapTR15 *)(pTrpdMem + sizeof(CSL_UdmapTR15));
    uint32_t *pTrResp = (uint32_t *) (pTrpdMem + (sizeof(CSL_UdmapTR15) * 2U));
    uint32_t cqRingNum = Udma_chGetCqRingNum(chHandle);

    /* Make TRPD */
    UdmaUtils_makeTrpd(pTrpd, UDMA_TR_TYPE_9, 1U, cqRingNum);

A.

  • Hi AnBer,

    Sorry for the late reply. Please find answers to your questions below.

    Q2.1: Yes single channel is sufficient. But using single channel, the transfer will happen one by one. 

    Q2.2: This really depends on the source and buffer addresses. If the source and destination buffers are at equal distances from each other, we can use single descriptor. But i would recommend using multiple descriptor, one for each src to dst transfer.. 

    Q2.3: Yes, this is what i mentioned in second answer. You could create multiple TRs, one for each src to dst transfer and submit them to same channel. 

    Q3:  I think the descriptor size for TR type 15 and TR type 9 are same, so when calculating size, they can be used interchangeably. But type, like UDMA_TR_TYPE_9, should be mentioned correctly in the TR. 

    Regards,

    Brijesh