Go Down

Topic: Sketch uploads only the first time after bootloader (Read 312 times) previous topic - next topic


So, I built a board that uses an ATmega328P (Old Bootloader).  I left out the USB chip, planning to use an FTDI cable instead.  I've burned the bootloader using an Arduino as ISP through the ICSP header.  I then used the FTDI cable to push my sketch, which worked fine.  The issue is that if I try to re-upload my sketch via the FTDI cable, I get the error - avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x22

It appears the sketch will only upload the first time after I burn the bootloader.  Does anyone know why this would be?


Did you include the DTR autoreset circuit in your design? (this is a 0.1uF cap from RESET of '328p to DTR or RTS of serial adapter, the typical 10k resistor from RESET to Vcc, and (recommended, but unclear if actually necessary in real-world conditions) a small diode from RESET to Vcc (band towards Vcc). Without this, the chip will only program via serial once, when there is no sketch already there, so the bootloader is running continually - after that, opening the serial port won't reset the sketch, so the old sketch will continue to run, instead of the bootloader.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy


AHH!! RTS wasn't actually connected.  I added that with the cap and it's working now.  Thanks for your input

Go Up