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!