Hello all, This is a really strange problem i have just encountered.
to simplify i am trying to load values AABB CCDD EEFF into the pca capture regs.
So the code to do this should simply be:
PCA0CPL0 = 0xBB; PCA0CPL1 = 0xDD; PCA0CPL2 = 0xFF; PCA0CPH0 = 0xAA; PCA0CPH1 = 0xCC; PCA0CPH2 = 0xEE; (this is generate by config2)
however when using the debugger i can see that
PCA0CP0 = 0xCCBB
PCA0CP1 = 0xEEDD
PCA0CP2 = 0xAAFF
It looks like miss-mapped registers.
So my question is, is this a known issue with the header file? Are there any other known issues like this? Thanks, Tom
the PCA is not identical on all derivatives
Sorry i completely forgot to mention, i am using the c8051f330 chip. I have included the proper header file "c8051f330.h" and i have confirmed the correct chip is selected in target.
since this is a chip issue, not a compiler issue, I recommend posting here: http://community.silabs.com/ erik
I think I'm going to have to pull the chip off and replace it. I thought perhaps the problem was amiss mapped header file or possibly a compiler issue. However I found that when I compiled the code and selected simulator instead of actually programming the chip I can see all registers are programmed correctly. I can only conclude the problem must be with the chip itself because the simulator works fine.
But it's the chip that is the "original".
And the simulator tries to match the original as best as possible.
Have you verified that the header file is matching the datasheet for the processor?
Another thing - the debugger is showing you information based on a configuration file. And if this configuration file is wrong (likely having the same error as the simulator) then what you see will not match the reality.
just my $0.02
I would NEVER use a simulator if JTAG/ICE/.. (the real thing) was available