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: Questions regarding DMA (DRU)

Part Number: TDA4VM


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);

Best regards,