Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I burned the arduino bootloader within a atmega88, in order to program it directly from the serial port. But I can't download my code from the arduino IDE... But I get the famous : 'avrdude stk500_getsync() not in sync resp=0x00' error.

what I did :

  1. I set the fuse :

    • Fire the bootloader after RESET (BOOTRST fuse)
    • Set the bootloader section size to 1024 words (2048 bytes), because the compiled bootloader is ~1400 bytes (BOOTSZ0 & BOOTSZ1)
    • Enable SPI programming, of course, we don't want to brick the chip (SPIEN)
    • Set the clock to the internal 8Mhz clock, since wee don't use an external one

which gives :

EFUSE = 0x00

LFUSE = 0xe2

HFUSE = 0xdf

through ISP port and an arduino as ISP:

avrdude -P COM3 -b 19200 -c avrisp -p m88 -v -U efuse:w:0x00:m -U hfuse:w:0xDF:m -U lfuse:w:0xE2:m
  1. I find a bootloader for the atmega88 (https://github.com/royshil/ATmega88-bootloader) and download it within the µC.

through ISP port and an arduino as ISP:

avrdude -P com3 -b 19200 -c avrisp -p m88 -v -e -Uflash:w:ATmegaBOOT_88_m88.hex -U lock:w:0x0F:m

  1. I tweaked $(ARDUINO)/hardware/arduino/boards.txt to add this: atmega88.name=ATmega88 atmega88.upload.protocol=arduino atmega88.upload.maximum_size=7168 atmega88.upload.speed=19200 atmega88.bootloader.low_fuses=0xe2 atmega88.bootloader.high_fuses=0xdf atmega88.bootloader.extended_fuses=0x00 atmega88.bootloader.path=atmega88 atmega88.bootloader.file=ATmegaBOOT_88_m88.hex atmega88.bootloader.unlock_bits=0x3F atmega88.bootloader.lock_bits=0x0F atmega88.build.mcu=atmega88 atmega88.build.f_cpu=8000000L atmega88.build.core=arduino atmega88.build.variant=standard

Until here, everythings works fine. But finally I'm not able to download directly my code from the arduino IDE as usual (using an FTDI adapter).. and get the error ... stk500_getsync() not in sync resp=0x00

what can it be?! here is the wiring of my board: (CON2 is the connector part for the FTDI adapter) enter image description here

all help will be much appreciate!

Thank you internet ;)

share|improve this question
    
Try halving the upload speed: atmega88.upload.speed=9600 – Nick Gammon Aug 27 '15 at 21:50
    
I tried this hypothesys but i didn't work either... Same issue : not in sync : resp=0x00 – CrH Aug 28 '15 at 15:30
    
And you are using IDE menu "Sketch>Upload Using Programmer" with the correct programmer selected? – Mikael Patel Feb 16 at 16:00

I add a similar issue with a Nano v3 with a burnt FTDI chip. I tried to use another FTDI to flash it and didn't work.

That was because in addition to connecting RX to TX, TX to RX and DTS to RESET (DTR? not sure right now), it's also needed to connect CTS to MISO and RTS to MOSI.

It was funny because I had no DTR/DTS pin available then, and had to do the reset manually.

share|improve this answer
    
I successfully program the chip through the isp port. The communication with the serial port works correctly, i get some feedback. When i tried to program it through serial port, i clearly saw that the chip is being reseted... Any other ideas?! – CrH Aug 28 '15 at 15:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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