for example, i write code like this:
REFDV = 0x01;
so i expected that REFDIV0 = 1
but when i run this code(using Trace32)
(before)
(after)
the REFFRQ1 became 1, seems like reversed when writing.
And it have the same problem in reading. If i want to read bit3( REGISTER_BIT3), have to use the bit4( REGISTER_BIT4)....
(though the REFDV.Byte=1 in the watch)
And i'm very confuse about this.
So if anyone have ideas?
If it is problem with bit order or something else?
Hi,
Have you tried changing Endian?
I think the command is: SYStem.Option BigEndian
Regards,
Daniel
I thought about Endian. But changing Endian is changing byte order, right? My problem is the bit order, and i think that it may be some settings related to compiler or debugger(TRACE32)
Hi,
We don't use TRACE32 for S12(X) but only for ARM 32-bit MCUs, I only tried changing Endian there and it changes the bit order in which registers are read. But this is probably not the problem. You may refer directly the Lauterbach support.
Regards,
Daniel
Hi,
The problem has been solved.
I use "watch" to watch the every bit of register like the picture in my question. and i found that it's "incorrect". But I tried to use "peripherals" to watch the register. It shows the value of register as we think. And I have corrected my code using "peripherals".
Also thanks to Lauterbach support that they told me try using it.
Br,
Kim