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.

TMS320F28379D: External memory storage/copy malfunction while trying both emif_dc example and SDFM result.

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Dear team. 

I'm investigating EMIF feature on F28379D to be used as SDFM ADC result storage for data acquisiton.

As guided at "C:\ti\c2000\C2000Ware_4_03_00_00\boards\TIDesigns\F28379D_EMIF_DC", I got the reference design board.

With attached that board to the F28379D ControlCard, I first have examined the example at 

"C:\ti\c2000\C2000Ware_4_03_00_00\device_support\f2837xd\examples\cpu1\emif_dc_cpu". 

and I can see the correct data both dstBuffer and srcBuffer. of course it means data copy from the SDRAM to the ASRAM worked well. 

For the next step, I increased the value stored in srcBuffer as following.

    for(word=0; word<BUFFER_WORDS; word++)
    {
        srcBuffer[word] = word+5000;
        dstBuffer[word] = 0;
    }

In this time also, I can see the correct data both dstBuffer and srcBuffer. 

For the next step, I increased the value more than 5,000, for example, 10,000 as following.

void main(void)
{
    Uint16 word;
    Uint16 errors;

    //
    // Initialize System Control:
    // PLL, WatchDog, enable Peripheral Clocks
    //
    InitSysCtrl();

    //
    // Initialize EMIF module for use with daughtercard
    //
    EMIF_DC_setupPinmux(EMIF_NUM, GPIO_MUX_CPU1);
    EMIF_DC_initModule(EMIF_NUM);
    EMIF_DC_initCS0(EMIF_NUM);
    EMIF_DC_initCS2(EMIF_NUM, EMIF_DC_ASRAM);

    //
    // Initialize data buffers
    //
    for(word=0; word<BUFFER_WORDS; word++)
    {
        srcBuffer[word] = word+10000;
        dstBuffer[word] = 0;
    }
    ESTOP0;
    //
    // Verify that data buffers have correct starting values
    // If buffers are not initialized correctly, check the following:
    //      EMIF_NUM (emif_dc_cla.c)
    //      EMIF_DC_F2837X_LAUNCHPAD_V1 (emif_dc.h)
    //      _LAUNCHXL_F28377S or _LAUNCHXL_F28379D (Predefined Symbols)
    //
    errors = 0;

    for(word=0; word<BUFFER_WORDS; word++)
    {
        if(srcBuffer[word] != word+10000)
        {
            errors++;
            ESTOP0;
            break;
        }
        if(dstBuffer[word] != 0)
        {
            errors++;
            ESTOP0;
            break;
        }
    }

    //
    // Execute block data transfer using assembly routine in memcpy_fast_far.asm
    //
    memcpy_fast_far((volatile void*)dstBuffer, (volatile const void*)srcBuffer, BUFFER_WORDS);

    //
    // Verify that block data has been transferred
    //
    for(word=0; word<BUFFER_WORDS; word++)
    {
        if(srcBuffer[word] != word+10000)
        {
            errors++;
            ESTOP0;
            break;
        }

        if(dstBuffer[word] != word+10000)
        {
            errors++;
            ESTOP0;
            break;
        }
    }

    if(errors == 0)
    {
        ESTOP0; // PASS
    }
    else
    {
        ESTOP0; // FAIL
    }
}

Now I can see the improper value on memory browser as following. 

Of course it couldn't pass the verification stage. 

I tried another case, 8000 for the value to be put to the srcBuffer. 

In this case, the value I can see through Expression tab was moving in real-time as followings. 

I didn't attach the screenshot for signed integer value here, but it also showed the simillar result. 

I was wondering if you let me know the reason for this result.

Actually I first tried to put the SDFM result(it is signed integer value) to buffer located in SDRAM. 

But I got the simillar result I explained through this thread at that moment. 

Thank you. 

Best regards.