Closed brolly759 closed 3 years ago
Update. I changed the USB programmer from the CP2102N to the FTDI, added a 100nF Cap to DTR and I can program over USB now. So there is something wrong with the CP2102N wiring, driver or chipset itself? Strange that 1 bootloader works on 1 programmer and the other works with another bootloader?
Have the same problem here. Still investigating.
Edit: Solved my issue by Checking all the Wiring. Most noteworthy the reset was not working when I opened a serial terminal. After flashing the bootloader the bootloader will be active and thus first upload always worked for me.
Exactly which .hex file or build options are you using? 57600 is one of the bit rates that isn't exact at 8Mz (about 2.1% off) and it's possible that some USB/Serial converters might be off in the OTHER direction, causing problems.
Running into a strange issue where the optiboot bootloader refuses to upload code over USB/UART but works find with default Arduino Pro Mini 3.3v/8MHz board settings and bootloader.
Hardware: Custom PCB (ATMEGA328P-MU-ND) and Programmer (cp2102N) ALT Hardware: 2 Arduino Nano Pro Mini's + FTDI Arduino IDE 1.8.12 avrdude: Version 6.3-20190619
I am using the board manager with v8.0 optiboot. I select optiboot on 32-pin MCUs I select 8MHz(int) I use Arduino as ISP to upload bootloader to other Arduino Nano's and custom PCB.
At this point I would figure that its a hardware issue but I load the original bootloader (non optiboot) from Arduino IDE and everything works fine and I can upload over UART/USB.
So what am I missing? Is there something in the bootloader that is checking for pin states? Is there still a timing issue somewhere? Why would the non optiboot bootloader work? I even thought it was an issue with the LED start up routine so I built my own bootloader with this command: make UART=1 AVR_FREQ=8000000L BAUD_RATE=19200 LED_START_FLASHES=0 atmega328. I also tested MiniCore and same issues.
Any help would be appreciated!
avrdude: Version 6.3-20190619 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch
avrdude: stk500_recv(): programmer is not responding avrdude: stk500_recv(): programmer is not responding Hardware Version: 4744608 Firmware Version: 8.4611299 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_recv(): programmer is not responding avrdude: stk500_recv(): programmer is not responding Vtarget : 420030.5 V Varef : 0.3 V Oscillator : 921.600 kHz SCK period : 10844687.6 us
avrdude: stk500_recv(): programmer is not responding avrdude: stk500_recv(): programmer is not responding avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check.
avrdude done. Thank you.
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.