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.

TMS320F28388D: D31

Part Number: TMS320F28388D

Hi,

Before I complained 28388D external memory.

but anyway use it well by separately initializing.

But recently really strange phenomena happened!!!

After declaring long integer variable in external 32bit memory,

(EMIF A0~.. => Ext Memory A0..   EMIF D0~D31.. => Ext MemoryDo~D31)

some operation with this variable work abnormally!!!

for example

    long int test_out;

    test_out= 0x12345678;

    test_out&= ~0x0f;

Then

Normally expected is

    test_out= 0x12345670;

But

    test_out= 0x56705670!!!!

How to resolve it???

Regards

Kenny W.Lim

  • HI Kenny,

    I am assuming you are using ASRAM interface in this case and configured the EMIF in 32bit mode.

    Can you post the respective dis-assembly code for this part of C code. You can use disassembly view in CCS to get this info.

    Regards,

    Vivek Singh

  • Thank you for your fast response.

    Relevant code and image are attached below.

    I'll anticipate good solution.

    Regads.

    Kenny W.Lim

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

    -Related codes and image clip

    test_out= 0x12345678;
            MOV @AL, #0x5678
            MOV @AH, #0x1234
            MOVL @0x3a, ACC


    test_out&= ~(0x0f);       

            AND @0x3a, #0xfff0

  • What is the value at address 0x14003A before execution of "test_out&= ~(0x0f);" ?

    Regards,

    Vivek Singh

  • Hi,

    Before that instruction executeed,

    test_out= 0x12345678  is executed. 

    So of course the memory value of test_out was 0x12345678.

    Here is  another unbelievable case in other project.

          test_out= 0x12345678;     --------------------(1)

         test_out&= 0x000f;   ----------------------------(2)

    => Then test_out is cleared all !!!   

    Please help me.

    Regards

    Kenny W.Lim

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

    The result image

    -When Line 1 Executed

     Hen Line

    When Line 2 Executed

  • My question was, if you read the test out location in ccs expression or memory watch window after execution of  test_out= 0x12345678; , do you see correct value ? Look like that is correct. I am looping in our compiler team to look into this issue.

    Regards,

    Vivek Singh

  • Yes, that's correct as you thought.

    I'm looking forward this issue to be solved well.

    Regards.

    Kenny W.Lim

  • Based on what I see so far, the compiler has generated correct code.  I want to check again, but in a different way.  It appears all the problem expressions are in one source file.  For that file, please follow the directions in the article How to Submit a Compiler Test Case.

    Thanks and regards,

    -George