Hi,
I am trying to program the flash of the LPC1769 with a .bin file that I have. I am using the LPC Link 2 debugger to program the LPC1769 over SWD. For some reason, if I try to program the .bin to address 0x00, I get an error saying "Writing target memory failed." I've tried using both MCUXpresso and J-Flash. Even after erasing the device, I still cannot program to 0x00.
The strange thing is that if I try to program the same .bin file to 0x400 or any address higher, it programs successfully, but obviously doesn't work correctly. 0x399 or lower, I get the error.
Any ideas?
Pics of error from MCUXpresso and J-Flash included.
Thanks.
已解决! 转到解答。
Hi @mgaschler
Thank you so much for your reply.
Hope you are well. Regarding your doubt, I already erased and re-programmed this board PNEV5180B that includes a LPC1769, using GUI Flash Tool and also J-Flash Lite to double-check, and I was succesfully able to flash the .bin on Address 0x0000 without any error. One particular observation was that I needed to press Reset button on my board after I flashed program in order to get this one running.
I tried with two different examples from LPCOpen imported to MCUXpresso (freertos_blinky and periph_blinky) and it worked well.
I would like to know if you are using a custom board or which NXP board you are using? My suggestion is to try reproducing this examples to see that everything is working well.
Please let me know your results or any other concern that you have. We are here to assist you.
Thank you so much.
Sincerely,
Pablo Avalos.
Hi @mgaschler
Thank you so much for reaching us in our community.
It is a pleasure to assist you. Regarding your issue, as you mentioned, above address 0x400 or higher is the programmable flash memory, because, below this address are the active interrupt vectors as shown in the next image from LPC1769 datasheet:
That is the reason that you saw that error.
Hope this information was helpful, please let me know if you have more concerns.
Sincerely,
Pablo Avalos.
Hi @PabloAvalos,
Thanks for the response. My confusion comes from the fact that some official NXP documentation says that a .bin file should be programmed to address 0x00. Does this mean that any .bin file for the LPC1769 should be programmed to 0x400 and will work correctly? Thanks.
Hi @mgaschler
Thank you so much for your reply.
Hope you are well. Regarding your doubt, I already erased and re-programmed this board PNEV5180B that includes a LPC1769, using GUI Flash Tool and also J-Flash Lite to double-check, and I was succesfully able to flash the .bin on Address 0x0000 without any error. One particular observation was that I needed to press Reset button on my board after I flashed program in order to get this one running.
I tried with two different examples from LPCOpen imported to MCUXpresso (freertos_blinky and periph_blinky) and it worked well.
I would like to know if you are using a custom board or which NXP board you are using? My suggestion is to try reproducing this examples to see that everything is working well.
Please let me know your results or any other concern that you have. We are here to assist you.
Thank you so much.
Sincerely,
Pablo Avalos.