AnsweredAssumed Answered

IAP via JTAG on LPC1754 #1

Question asked by Peter Van Hoomissen on Feb 20, 2017
Latest reply on Feb 22, 2017 by Peter Van Hoomissen

I need a more detailed explanation of IAP via the JTAG port. Documentation is verry limited, and I need to know what values the LR (link register) and the SP (stack pointer) need to be set to for IAP commands to work. I would also like to double check the values that I am using for the PC (program counter), r0 , and r1 are appropriate. At the moment I am able to halt the core and write to r0, r1, and the SP which by the UM are the only registers that need to be set. However when I step the core or restart the core, I tried both, r0 will change but r1, and the PC don't and I do not get a return in the RAM pointed to by r1. What do the other core registers need to be set to for this to work?



EDIT: I found that my immediate problem here was my code writing to the stack pointer rather than the program counter.. Doh!! I am still seeing odd behavior that I think is a result of not having a valid address in the link register. Is there a location I can point to to have the cpu just sit and spin or to I need to write a HALT command into RAM and point to it?