The location is 0x7FFFFFF1 indicating that it is a Thumb mode
instruction. A 'bx' instruction is typically used to branch
to Thumb code from ARM. See my LPC_FlashRoutines-18Feb05.zip
post to the files section of this mailing list for operational/
example code.
Regards
-Bill Knight
R O SoftWare &
http://www.theARMPatch.com
On Sun, 24 Apr 2005 12:51:01 -0000, sig5534 wrote:
I am getting an Invalid Instruction Exception trying to get my IAP
routines running. When it branches to the IAP service routine at
0x7FFFFFF0, it goes to the next instruc which is invalid.
==>> 0x7FFFFFF0 F7FFB580 LDRNVB R11,[PC,+R0,LSL #0xb]
0x7FFFFFF4 BC80F949 DD 0xBC80F949 ; INVALID OPCODE
0x7FFFFFF8 4718BC08 LDRMI R11,[R8,-R8,LSL #0x18]
0x7FFFFFFC FFFFFFFF SWINV 0xffffff
0x80000000 DEADDEAD CDPLE CP14,0xa,CR13,CR13,CR13,0x5
0x80000004 DEADDEAD CDPLE CP14,0xa,CR13,CR13,CR13,0x5
0x80000008 DEADDEAD CDPLE CP14,0xa,CR13,CR13,CR13,0x5
R00=0x40000EF8
R11=0x40000F30
Here is the code snip:
void attrib_RAM FlashData(void) {
typedef void (*IAP)(unsigned int [],unsigned int[]);
unsigned int command[5];
unsigned int result[2];
// setup
IAP iap_entry;
Disable_INT();
iap_entry=(IAP) IAP_LOCATION;
// Prepare to erase
command[0]=50;
command[1]=14;
command[2]=14;
iap_entry(command, result);
if (result[0] != IAP_CMD_SUCCESS) goto error;
...
It's pretty standard. I don't know why it is causing this crash.
I must be missing something simple.
I guess I don't know where the PC is suppose to go after 0x7FFFFFF0.
Seems like it should go to the handler routine for cmd #50, but it
just drops to the next instruc.
Any ideas?
Thanks, Chris.
Yahoo! Groups LinksMessage
Re: [lpc2000] IAP Problem
2005-04-24 by Bill Knight
Attachments
- No local attachments were found for this message.