0

I know, i am a bit dummy sometimes and i don't know why i actually did this but here it is. I have an arduino nano and i want it to use an external power via the the Vin port using a 12V external power supply. I thought this would be as simple as replacing the usb power supply by my external 12V power supply on the Vin pin. But nothing works so i did some digging on the problem and after many tries like soldering the pins 25 and 26 of the FTDI or connect the TX/RX pins to the GND. Concerning that last point, because the TX/RX was still flashing after beeing connected to the GND i have put in my program this two lines to force TX/RX to be disabled and this is my mistake :

digitalWrite(0,LOW);
digitalWrite(1,LOW);

And now what a surprise i can't load a program in my arduino nano anymore even using another arduino to burn the bootloader. And i get this message :

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x2e
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x2c
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x33
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x38
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x2e
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x33
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x31

I would like to come back to my factory arduino nano and/or enable once again the TX/RX connections ...

2
  • it is not the problem of the code. if you reset the Nano the bootloader runs for 2 seconds and has UART setup correctly and not affected by setup() of your sketch. so remove wires from RX and TX pin
    – Juraj
    Commented Sep 3, 2019 at 8:33
  • Nothing is plugged on RX and TX pins Commented Sep 3, 2019 at 8:47

2 Answers 2

0

After some more tries something actually worked reinitialising the TX/RX pins, but i don't know why really. I wired RX pin to the reset and i loaded an empty code into the arduino, after that i was able to load any program into my arduino again. Problem solved, but why it solved the problem is the question now.

2
  • please do not use an "answer" to post a comment
    – jsotola
    Commented Sep 3, 2019 at 17:35
  • post a new question about it ... include the sketch that "broke" the arduino
    – jsotola
    Commented Sep 3, 2019 at 17:36
0

You could also do this: in the IDE, select File:Preferences and turn on Verbose outputs.

Press & hold reset, that puts all the IO pins into Inputs, then start a download. When the compiler process shows "compilation complete, xxxxxx bytes of 32xxx used" or similar, release the Reset button.

That allows the bootloader code to run and talk to the PC over the serial pins - before your sketch has chance to run and write the 2 serial pins low.

It might take a couple of tries to release Reset at the correct time. Be patient try a few times with just a short sketch to clear out the offending code:

void setup();
void loop();

That would do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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