Odd addresses generated for PIC33F CLR instruction- OK?
Posted: Sun May 09, 2010 11:41 pm
Hi-
I am a dsPIC newbie, and have been trying to nail down the cause of a
restart loop in PCI33F code that I inherited. The ASM code that apparently
causes the reset is:
Note that the operand addresses in both instructions are ODD.
Is an odd address legal in a CLR instruction?
Also, a different source line (if I read it right) is using even addresses
for the same variable:
Code:
.................... gpsData.dateInfo.adjusted.time = res;
01B86: PUSH F1C
01B88: POP DDA
01B8A: PUSH F1E
01B8C: POP DDC
I hate to suspect the compiler when I'm so new to dsPICs, but
this really looks odd (pun intended).
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
Posted: Mon May 10, 2010 7:16 am
Word accesses (e.g. CLR) to an odd address cause an address error trap with PIC24/dsPIC. As discussed in a previous
thread, you can enable a trap handler to visualize this kind of error (and even allow the code to continue, if meaningful at all).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum