0

I have created sketch where Arduino goes to powerdown mode in about 1s after boot. Now I can not upload other sketch, because programmer does not get proper response. I tried to hold reset and release it at various stages during compile/upload, but it does not help. I suspect the programmer needs to communicate with Arduino for several seconds. Any advice how to erase the sketch without programmer, or how to ban the sleep mode? It is Pro Mini 168. Thanks

2

Hold the reset button while you start the upload. Wait until you upload first tries to connect to the Arduino, then release the reset.

If you can't get that to work, the next option is to load another Arduino with the ArduinoISP example sketch, connect the two as described in the comments, and use the 2nd Arduino to program yours.

Update:

Would another Arduino overcome this problem?

Ok, then it's time for plan B. Using a programmer (real, or simulated by another Arduino) doesn't depend on the 'failing' Arduino's bootloadloader but uses a direct (SPI) interface to program it. This article has more information.

  • Thanks for the response but I have tried to hold reset many times and Arduino never synchronized. I think it goes to sleep despite the data ready signal on programming interface. Would another Arduino overcome this problem? Sorry but I do not see any comments you refer to by "connect the two as described in the comments". Jan – Jan Nov 14 '18 at 23:02
0

Turn on Verbose output (Under File:preferences). Press & hold the Reset button. After the compilation ends, you will see a message like:

"Compiled xxx of 32xxx bytes". That's when the download starts - release reset. It make take a few tries to get the timing of the release correct.

If you can't get the reset to take hold, then it's time to reburn the bootloader using a Programmer connected to the ICSP pins.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.