recently I was trying to burn the bootloader on my Severino with a new ATMEGA328p using a USBasp and it fails on the verification of the fuses saying that 0xFD != 0x05. I believe it is related with the bug
and maybe my avrdude is not up to date on Ubuntu.
Reading I understood that for the atmega328p the extended fuse has only 3 bits so 0xFD is equivalent to 0x05
So I decided to run the commands manually replacing the 0x05 to 0xFD
After this point I cannot upload any program through the serial port, it tries 10 times and then stops.
If I upload a program using the USBasp everything is ok.
Any hints what to look to understand why it fails?"
Arduino 1.6.12 ,Linux Mint 18.
Choose the right serial port after removing the Usbasp .
Serial enable JP0 set to 2-3 position.
JP4 set to 1-2 position to enable auto reset.
Be sure that computer COM Port speed is set to 19200bps otherwise auto reset will not work properly.
You may want to try burning bootloader to the chip as Arduino Duemilanove w/ ATMega328 board .
I have been ignoring the warning about the efuse 0x05 to 0xFD.
When I changed the efuse to the value of 0xFD using my usbasp on a Nano clone that uses the Uno optiboot I couldn't cause any failure to load using the serial port unless I didn't have the right port selected.
Thank you @kprlms. The jumpers are ok (at least I tested all possibilities yesterday), but I didn't try to lower the com speed to 19200, I will test it this evening.
The com speed of 19200 is probably for an atmega168. According to the board text for an Arduino Duemilanove or Diecimila w/ ATmega328 the com speed would be 57600.
This URL seems to point to using the Diecimila in place of the Severino and using
atmega328.bootloader.file = ATmegaBOOT_168_atmega328.hex
After this point I cannot upload any program through the serial port, it tries 10 times and then stops.
If I upload a program using the USBasp everything is ok.
Any hints what to look to understand why it fails?"
Be aware that if you upload a sketch via ISP programming, it removes the bootloader.
Upload bootloader, press reset. Do you get the 3-blink pattern indicating that optiboot is running?
If yes, when you attempt to upload, do you get the 3-blink pattern? If not, that indicates a problem with autoreset.
Looking at the Severino schematic, I see that it has the same autoreset mechanism as any other board - the DTR pin (pin4 of the 9-pin connector) is connected to the reset pin through a 0.1uf cap. As long as the serial adapter you're using brings out the DTR pin, autoreset should work - regardless of the baud rate. Note that not all serial adapters actually bring out the modem control pins (DTR, RTS, and so on)
The bootloader is installed using the 0xFD as efuse, from the command line only. I cannot install using the arduino IDE since it fails to verify 0xFD as 0x05. For some reason the new avrdude returns unused bits as 1 instead of 0?
After that I could burn the bootloader again from the command line (strangely enough only when I removed the Ulock option).
Now I can upload programs through the serial cable at 115200 with some caveats. When I start the upload from IDE and after a while I manually press reset on my board. Or if I unplug the serial cable, plug it back in and after a few seconds I press upload.
Something is failing with the autoreset for uploading only. I've made a simple test program that returns a counter as messages in the Serial, and everytime I connect with a terminal I can see that the board is resetting properly and the counter starts from zero.
"Now I can upload programs through the serial cable at 115200 with some caveats. When I start the upload from IDE and after a while I manually press reset on my board. Or if I unplug the serial cable, plug it back in and after a few seconds I press upload."