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.

EDMA3 transfer doesnt occur despite no error msgs

Hello all,

I am currently getting familiar with the EDMA3 module and tried to write a simple code to transfer an array from L2 SRAM to DDR memory. I am using the little endian C6670 functional simulator with CCS 5.2 and EDMA3 LLD 02_11_05_02. The code compiles without errors and I also dont get any errors using the EDMA3 LLD API functions. However, if I take a look at the destination address, I cant see the transferred array elements. I would appreciate any help with this issue and thanks in advance. Here is the code:

--------------------------------------------------------------------------------------------------

Void main() {

    char testStr_start[ 4 ] = "1234";

    EDMA3_DRV_Result edma3_result;
    EDMA3_DRV_InstanceInitConfig *sampleInstInitCfgPtr = &sampleInstInitConfig;
    EDMA3_DRV_GblConfigParams *edma3_gblCfgParamsPtr = &sampleEdma3GblCfgParams;
    EDMA3_DRV_InitConfig initCfg;
    EDMA3_DRV_Handle hEDMA = NULL;

    Uint32 edma3_instId = 1;
    EDMA3_DRV_MiscParam miscParam;
    miscParam.isSlave = FALSE;
    miscParam.param = NULL;

    initCfg.regionId = 1;
    initCfg.isMaster = TRUE;
    initCfg.drvSemHandle = NULL;
    initCfg.drvInstInitConfig = sampleInstInitCfgPtr;
    initCfg.gblerrCb = NULL;
    initCfg.gblerrData = NULL;

    Semaphore_Params edma3_semParams;
    Semaphore_Params_init( &edma3_semParams );

    uint32_t chan = EDMA3_DRV_DMA_CHANNEL_ANY;
    uint32_t tcc = EDMA3_DRV_TCC_ANY;
    EDMA3_RM_EventQueue edma3_rm_eventQueue = 0;

    uint32_t srcAddr = ( uint32_t ) &testStr_start[0];
    uint32_t destAddr = 0x80000000;

    int16_t srcBIdx = 0;
    int16_t srcCIdx = 0;
    int16_t destBIdx = 0;
    int16_t destCIdx = 0;
    uint16_t aCnt = 4;
    uint16_t bCnt = 1;
    uint16_t cCnt = 1;
    uint16_t bCntReload = 0;

    edma3_result = EDMA3_DRV_create( edma3_instId, edma3_gblCfgParamsPtr, ( void* ) &miscParam );

    if ( edma3_result == EDMA3_DRV_SOK )

        System_printf( "EDMA3 Instance %i was successfully created\n", edma3_instId );

    edma3_result = edma3OsSemCreate( 1, &edma3_semParams, &initCfg.drvSemHandle );

    if ( edma3_result == EDMA3_DRV_SOK )

        System_printf( "EDMA3 Semaphore was successfully created\n" );

    hEDMA = EDMA3_DRV_open( edma3_instId, ( void* ) &initCfg, &edma3_result );

    if ( edma3_result == EDMA3_DRV_SOK )

        System_printf( "EDMA3 Instance %i was successfully opened\n", edma3_instId );

    edma3_result = EDMA3_DRV_requestChannel( hEDMA, &chan, &tcc, edma3_rm_eventQueue, 0, NULL );

    if ( edma3_result == EDMA3_DRV_SOK )

        System_printf( "EDMA3 channel request for channel %i was successfull\n", chan );

    edma3_result = EDMA3_DRV_setSrcParams( hEDMA, chan, srcAddr, EDMA3_DRV_ADDR_MODE_INCR, EDMA3_DRV_W256BIT );

    if ( edma3_result == EDMA3_DRV_SOK )

        System_printf( "EDMA3 source parameters were set successfully\n" );

    edma3_result = EDMA3_DRV_setSrcIndex( hEDMA, chan, srcBIdx, srcCIdx );

    if ( edma3_result == EDMA3_DRV_SOK )

        System_printf( "EDMA3 source indices were set successfully\n" );

    edma3_result = EDMA3_DRV_setDestParams( hEDMA, chan, destAddr, EDMA3_DRV_ADDR_MODE_INCR, EDMA3_DRV_W256BIT );

    if ( edma3_result == EDMA3_DRV_SOK )

        System_printf( "EDMA3 destination parameters were set successfully\n" );

    edma3_result = EDMA3_DRV_setDestIndex( hEDMA, chan, destBIdx, destCIdx );

    if ( edma3_result == EDMA3_DRV_SOK )

        System_printf( "EDMA3 destination indices were set successfully\n" );

    edma3_result = EDMA3_DRV_setOptField( hEDMA, chan, EDMA3_DRV_OPT_FIELD_STATIC, EDMA3_DRV_STATIC_EN );

    if ( edma3_result == EDMA3_DRV_SOK )

        System_printf( "EDMA3 linking disabled successfully\n" );

    edma3_result = EDMA3_DRV_setTransferParams( hEDMA, chan, aCnt, bCnt, cCnt, bCntReload, EDMA3_DRV_SYNC_AB );

    if ( edma3_result == EDMA3_DRV_SOK )

        System_printf( "EDMA3 Transfer parameters were set successfully\n" );

    edma3_result = EDMA3_DRV_setOptField( hEDMA, chan, EDMA3_DRV_OPT_FIELD_TCINTEN, EDMA3_DRV_TCINTEN_EN);

    if ( edma3_result == EDMA3_DRV_SOK )

        System_printf( "EDMA3 completion interrupt enabled successfully\n" );

    edma3_result = EDMA3_DRV_enableTransfer( hEDMA, chan, EDMA3_DRV_TRIG_MODE_MANUAL );

    if ( edma3_result == EDMA3_DRV_SOK )

        System_printf( "EDMA3 transfer enabled successfully\n" );

    edma3_result = EDMA3_DRV_waitAndClearTcc( hEDMA, tcc );

    if ( edma3_result == EDMA3_DRV_SOK )

        System_printf( "EDMA3 transfer completed successfully\n" );

}

-----------------------------------------------------------------------------------------------------------

Best Regards

Burak