I have programmed an LPC1768 to be nearly always in deep power down mode. It is waken periodically by an RTC alarm
Since I did this, I cannot reprogram the processor using the programmer included in Keil's microcontroller development tool kit.
What is the solution ?
Best regards
Pb solved. After disoldering the NMI pin to add a pull up to Vdd and force it to Gnd at reset, I have been able to reprogram the uc.
Thanks for your help
No, The pin is connected to its neighbour VddIO. So it is quite difficult to cut the connection temporarily. It is nearly as difficult as changing the micro.
Have you forced the chip into bootloader mode and then tried to erase the flash?
Thanks for the EINT0 idea. As a matter of fact, I had included some code to run a loop when coming out of deep power down if a pin was 0V.It works, I can see it on scope. I also can enter debug mode. Just cannot reprogram the flash : I get : "SWD communication failure" and then "Flash download failed"
Debugging is not possible in Power Down mode on LPC17xx because the chip turns off also the debug interface. Therefore also flashing is not possible.
A simple solution is to force the chip into bootloader mode at reset by holding EINT0 low while resetting the chip. Since chip will stay in bootloader mode the application which uses power down won't be executed and it will be possible to erase/reprogram flash.
Question to keil in process
I guess the debugger cannot distinguish beween the target being disconnected, and the target being "in deep power down mode"?
Have you spoken to Keil support about this?
Have you spoken to NXP support about this?
Thanks, but, it does not work
maybe you can hold the processor in reset using an external pin, release it (or not...?) and quickly erase the flash using JTAG/uv4...?
Some more information : programmer/debugger's name is U-LINK ME
Error message is : "Error: Flash download failed - Target DLL has been cancelled"
The processor runs its program normally from what can be seen with an oscilloscope.
View all questions in Keil forum