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.
Hello,
I am using TMS320F28P650DK device on CCS 12.5.0. I observe a difference between register view (vs) expressions window for the same CMPSS1regs.RAMPHREFS or CMPSS1regs.RAMPHREFA or CMPSS1REGS.RAMPHSTS
Please let me know at the earliest.
Best Regards,
Uttam
Hello,
The values are actually the same, it is just that the Expressions view will show the value as a signed decimal value while the Registers view will show it as unsigned decimal.
Thanks
ki
Hi Ki,
In that case, just the 15th bit is what defines the signed/unsigned.
Assuming that's been removed still the decimal value is different what i observe in the expression window.
Example:
hex= 0xCCCC
BIN= 1100 1100 1100 1100 (52428 decimal) (assuming the 15th bit is taken away) --> 0100 1100 1100 1100 which is still 19660 decimal.
But in the expression window instead of 19660 i see 13108 (decimal). Why the value is different here.
2Q). Why this only happens to specific registers in expression window?
Best Regards,
Uttam
BIN= 1100 1100 1100 1100 (52428 decimal) (assuming the 15th bit is taken away) --> 0100 1100 1100 1100 which is still 19660 decimal.
It doesn't quite work that way.
Please see below for full details (and a calculator:
https://onlinetoolz.net/unsigned-signed#base=10&value=52428&bits=16
2Q). Why this only happens to specific registers in expression window?
Typically most people prefer to use hex or unsigned int (decimal) when working with registers. However it is understandably confusing due to the inconsistency between the expressions and registers view
Our new CCS Theia IDE will be consistent and default to signed for both views.