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.

TMS320F2800137: CpuTimer Register address and bit status dis-match issue

Part Number: TMS320F2800137

Tool/software:

Hi Champ,

I am asking for customer.

We found out the register address and status are NOT matched from debug window.

Adding CpuTimer0Regs.TCR.bit.TIF to watchpoint, the address is 0x009DBA with value 0.

While reading from register and memory browser, it points to the correct address at 0x0C04 as TRM, and the bit.TIF is set.

In customer's code, the if statement in line 164 should be met and run line 165, however we never can run into the body of statement in run-time debug.

What's the problem here ? how to fix it 

Regards,

Johnny

  • Hi Johnny,

    Can you try reading the CpuTimer0Regs.TCR.bit.TIF field into a variable (maybe a boolean) and comparing against that? I'm not sure the type of the bitfield is being interpreted correctly by that if statement. Bitfields don't technically have addresses on the C28x since the smallest addressable data type on C28x is 16-bits. For this reason, it may be that the address you're seeing in the expressions view is a garbage value (I'm not sure how CCS technically handles this).

    Best Regards,

    Delaney