User`s guide
regread
later. Therefore, getting the values of register variables during program
execution may return unexpected answers.
Values that you write to register variables during intermediate times in
program operation may not get reflected in the reg ister.
This is true for local variables as well.
Onewaytoseethisistowritealineofcodethatusesthevariableand
see if the result is consiste nt.
register int a = 100;
int b;
...
b=a+2;
Reading the register assigned to a may return an incorrect value for a
but if b returns the expected 102 result, nothing is wrong with the code
or Embedded IDE Link CC software.
Examples For the C5xxx processor family, most registers are memory-mapped
and consequently are available using
read and write. However, use
regread to read the PC register. The following command demonstrates
how to read the PC register. To identify the processor,
cc is a link for
CCS IDE.
cc.regread('PC','binary')
To tell MATLAB software what datatype you are reading, the string
binary indicates that the PC register contains a value stored as an
unsigned binary integer.
In response, MATLAB software displays
ans =
33824
7-129