IAP via JTAG on LPC1754 #2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IAP via JTAG on LPC1754 #2

557 Views
petervanhoomiss
Contributor III

I am having a new problem in my writing of a programmer for a LPC1754. I am able to write to flash using IAP commands via the JTAG port and verify the results, but only for some memory locations. I can not seem to write to sector0, or odd 256byte pages in sectors1+. To clarify, I am able to write the data, but there are 1-10 single bit errors in the page. I verify that the data in my RAM stack is correct both before and after programming . I am using the PLL0 as my clock source divided by 2 and am passing 2000kHz CCLK to the copy ram to flash function. If any one has seen this behavior I am curious how you solved the problem.

I am also seeing that after a sector erase command that I need to release reset and then reenter the debug port to blank check the part. Blank checking after a sector erase never seems to return a response. I suspect that this is to the stack pointer or link register not being set with a proper value. I will probably try writing a HALT command into RAM and point to it unless there is a better way.

Labels (1)
0 Kudos
1 Reply

348 Views
petervanhoomiss
Contributor III

So after a bunch of experimenting I have found that the programming operation becomes stable with a clock of 1MHz. I do not know why at this point, but with a clock divider of 4 (register adds one so write of 0x3) in to CCLKCFG and CLKSRCSEL set to 0x0 (default) I stop seeing single bit errors. I am still seeing errors on the first write to a fresh memory location (never ever programmed) but any successive writes do not seem to have this problem... weird...