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.

TMS320F28335 Simulator issue

Guru 20045 points
Other Parts Discussed in Thread: TMS320F28335

Hello,

Does the TMS320F28335 simulator have any issues with moving long int types from registers (i.e. ACC) to memory?  I read in another post the 2812 simulator has problems with address range 0x3fffc2-0x3fffff. (http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/3661/13193.aspx)

The reason I ask is that I having problem with the piece of code shown below, which is contained in a function.  When I set "a" to be greater than 70000000, only the low word is changed in memory and therefore "a" doesn't get set to 70000000 (= .0x042C1D80)

That is if I set a to 0x043B63A9 (= 71001001), the code will set a to 0x043B1D80. 

The memory location I examined starts at 0xDE50  (The data page point is set to  #0x379, which gives an address of 889*64 words/page*16 = 56912 = 0xDE50.)

I am using compiler version 6.1.3.

Stephen

C Code

-----------

 if (a > 70000000)

 {   

     a = 70000000;  

}

 if (a< 0)  

{   

    a= 0;

}

 

Dissassembly

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

008a87:   0200        MOVB         ACC, #0

008a88:   1E10        MOVL         @0x10, ACC

1002    if (a > 70000000)

        C$L46:

008a89:   28A91D80    MOV          @AL, #0x1d80

008a8b:   28A8042C    MOV          @AH, #0x042c

008a8d:   0F10        CMPL         ACC, @0x10

1004    a = 70000000;

008a8e:   56480410    MOVL         @0x10, ACC, LT

1008    if (a < 0)

008a90:   0610        MOVL         ACC, @0x10

008a91:   6303        SB           C$L47, GEQ

1010    a = 0;

008a92:   0200        MOVB         ACC, #0

008a93:   1E10        MOVL         @0x10, ACC