Hi, I'm using ATMEGA 2560 in our customized board. I'm using USBASP programmer and everything works fine when i downloading using usbasp programmer. i downloaded bootloader and it is successful. Then i removed programmer and uploaded using usb to serial connected to UART0, it successfully uploaded and works fine. Again if i upload the program using usb to serial board it is not responding. if i burn bootloader again it works for one time and repeating the same.
i tried to erase the chip and done fuse bits from avrdude cmd as follows still the problem exists
Full Chip Erase
avrdude -c usbasp -p m2560 -e
Set Fuse Bits
avrdude -c usbasp -p m2560 -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xFD:m
Write the Bootloader
Tools > Burn Bootloader.
Set Lock Bits
avrdude -c usbasp -p m2560 -U lock:w:0x0F:m
Verify the Lock Bits
avrdude -c usbasp -p m2560 -U lock:r:-:i
following msg are the error msg during second time upload from usb to serial
Using Port : COM16
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x41
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x54
what shall i do retain the bootloader
