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.

CCS: TMS570LC4357 - SafeTI Diagnosis Library : DMA_SOFTWARE_TEST error

Other Parts Discussed in Thread: TMS570LC4357

Tool/software: Code Composer Studio

I use the TMS570LC4357 board and SafeTI Diagnosis Library.


When i use the project SafeTI Diagnosis Library whi, there are fail items in main loop.


SL_SelfTest_DMA(DMA_SOFTWARE_TEST) is failed in the project.

I check the code the green line is fail.


        if(!sl_dmaSoftwrTestConfig(&dma_test_varA, &dma_test_varB, DMA_PERMISSION_NO_ACCESS, &dmaCTRLPKT))
        {
            /* Perform configurations and initiate transfer - with no access permission for dma_test_varA */
            if(!sl_dmaSoftwrTestConfig(&dma_test_varB, &dma_test_varA, DMA_PERMISSION_NO_ACCESS, &dmaCTRLPKT))
            {
                /* Perform configurations and initiate transfer - with read only access permission for dma_test_varA */
                if(sl_dmaSoftwrTestConfig(&dma_test_varA, &dma_test_varB, DMA_PERMISSION_READ_ACCESS, &dmaCTRLPKT))
                {
                    /* Perform configurations and initiate transfer - with read only access permission for dma_test_varA */
                    if(!sl_dmaSoftwrTestConfig(&dma_test_varB, &dma_test_varA, DMA_PERMISSION_READ_ACCESS, &dmaCTRLPKT))
                    {
                        /* Perform configurations and initiate transfer - with write only access permission for dma_test_varA */
                        if(!sl_dmaSoftwrTestConfig(&dma_test_varA, &dma_test_varB, DMA_PERMISSION_WRITE_ACCESS, &dmaCTRLPKT))
                        {
                            /* Perform configurations and initiate transfer - with write only access permission for dma_test_varA */
                            if(sl_dmaSoftwrTestConfig(&dma_test_varB, &dma_test_varA, DMA_PERMISSION_WRITE_ACCESS, &dmaCTRLPKT))
                            {
                                /* Perform configurations and initiate transfer - with all access permission for dma_test_varA */
                                if(sl_dmaSoftwrTestConfig(&dma_test_varA, &dma_test_varB, DMA_PERMISSION_ALL_ACCESS, &dmaCTRLPKT))
                                {
                                    /* Perform configurations and initiate transfer - with all access permission for dma_test_varA */
                                    if(sl_dmaSoftwrTestConfig(&dma_test_varB, &dma_test_varA, DMA_PERMISSION_ALL_ACCESS, &dmaCTRLPKT))
                                        {
                                            retVal = TRUE;
                                        }
                                }
                            }
                        }
                    }
                }
            }
        }

So, I try to fix this problem. Then, I confirm the test is passed. I want to know this analysis is correct.

1. The test process dma test - protection test

    - dma_test_varA, dma_test_varB (two value) is used.

    - One is set protection state : dma_test_varA

2. The problem is dma_test_varA and dma_test_varB are created  in connection

  - ex) dma_test_varA : 0x8020FB8, dma_test_varB :0x8020FBC

3. The protection region setting code

  - code -

        sl_dmaREG->DMAMPR_L[0U].STARTADD = (uint32)(srcAddr);
        sl_dmaREG->DMAMPR_L[0U].ENDADD = (uint32)(srcAddr) + sizeof(uint32);

4. If the srcAddr is set as dma_test_varA addr , the protection region parameter is set

    sl_dmaREG->DMAMPR_L[0U].STARTADD = 0x8020FB8

    sl_dmaREG->DMAMPR_L[0U].ENDADD = 0x8020FBC

5. first 1 byte of dma_test_varB is set as protection - this occur test error! 

  • Minwoo,

    Can you please clarify if the test is failing out of the box or did you modify the code to perform the same DMA test over different region in memory?  I would like to make sure that this is not a bug in our test case. 

    From the explanation provided here, it does appears that your analysis is correct but I would like to understand why this doesn`t occur out of the box with the test case.

    Regards,

    Rahul

  • I test just DMA_SOFTWARE_TEST. and revise the code like this(To confirme the function result test)

    1. First state (Using the reference code result )

            sl_dmaREG->DMAMPR_L[0U].STARTADD = (uint32)(srcAddr);
            sl_dmaREG->DMAMPR_L[0U].ENDADD = (uint32)(srcAddr) + sizeof(uint32);

    2. Second state (Using the fix code result )

            sl_dmaREG->DMAMPR_L[0U].STARTADD = (uint32)(srcAddr);
            sl_dmaREG->DMAMPR_L[0U].ENDADD = (uint32)(srcAddr) + sizeof(uint32) - 1U;

    Regards,

    Minwoo