-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facing problems in uploading bootloader to Atmega128A #21
Comments
I have no issues burning bootloader using the latest Arduino IDE 1.6.12, so it's not a bug in the core. I need to see a picture of your actual setup to be able to figure out what might be wrong. You also need to turn on verbose output to get the full error information. Open Arduino IDE, goto settings and turn on all verbose option. Then post the error message from avrdude when you're burning the bootloader |
I am using the basic circuit : I am sure there is no bug in the core, but apparently I should be using the correct programmer. Using an Arduino is not working for me. What else could I try to make it work? /Users/macowner/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino6/bin/avrdude -C/Users/macowner/Library/Arduino15/packages/MegaCore/hardware/avr/1.0.3/avrdude.conf -v -patmega128 -cstk500v1 -P/dev/cu.usbmodem1411 -b19200 -e -Ulock:w:0x3f:m -Uefuse:w:0xff:m -Uhfuse:w:0xc6:m -Ulfuse:w:0xbf:m avrdude: Version 6.3, compiled on Sep 12 2016 at 17:22:25
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x15
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14 avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02 avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10 avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10 avrdude done. Thank you. Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions. This report would have more information with ` |
I don't have very good experience with the Arduino as ISP programmer, and prefer to use the USBtinyISP, which always works. It seems like an issue with your programmer, so you should try another programmer. The reason why I'm asking for a picture of your sets is because people tends to screw up without even knowing. It's impossible for me to spot HW errors without a picture |
I don't have USBtinyISP at hand. I read two different notes on it (one that suggested this works more reliably compared to Usbasp, and other that said USBTinyISP has been tested only for Atmega64 ). So, I didn't get one. I will upload a hardware picture too. My soldering skills are a little embarrassing so showing off is not my instinctive action. I have a little suspicion on the crystal as well so will try replacing it and see if that can help. |
You may try to burn the bootloader with the 1 MHz internal oscillator instead. If there's an issue with the crystal, that should solve it. If you want to change the clock frequency back to 16 MHz again, you just re-burn the bootloader |
Tried. `/Users/macowner/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino6/bin/avrdude -C/Users/macowner/Library/Arduino15/packages/MegaCore/hardware/avr/1.0.3/avrdude.conf -v -patmega128 -cstk500v1 -P/dev/cu.usbmodem1411 -b19200 -e -Ulock:w:0x3f:m -Uefuse:w:0xff:m -Uhfuse:w:0xd6:m -Ulfuse:w:0xa1:m avrdude: Version 6.3, compiled on Sep 12 2016 at 17:22:25
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x15
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14 avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02 avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10 avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10 avrdude done. Thank you. Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.` I guess that leaves me with no other choice but get UsbTinyISP. |
There's a forum post discussing the exact problem with Arduino as ISP as you have: If you're using an Arduino UNO; have you connected a 10 uF capacitor between the reset pin and ground (on the UNO)? |
Thanks. USBTinyISP ordered. One query. The led on the circuit, connected to pin 15, is it supposed to be on when connected? (Mine is not, I am trying to rule out any of my typical mistakes.) |
The LED is connected to pin PB5, and it should flash twice every second after the bootloader have been burnt. It isn't strictly necessary, but I've added it to the minimal setup schematic to help users debug potensial issues like this |
:-) Ok. |
Hi..I have the same issue with the USBtinyISP v3.0 I had just bought...I can't burn the bootloader on 128A. With another programmer ( AVRISP-MKII) and Arduino IDE 1.06 and chip-45 bootloader, it works but with higher IDE versions, with Mega core I can't burn it... avrdude: initialization failed, rc=-1 The same error appears when I'm using the Pololu USBavrISP v3, with only this 128-64 core. The rest of the avr's I can burn them whitout a problem.. |
Please turn on verbose upload so I can see the entire output from Avrdude. |
Hi again..This is what I get on screen avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
avrdude: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\.\libusb0-0001--0x1781-0x0c9f
avrdude: programmer operation not supported avrdude: Using SCK period of 10 usec avrdude done. Thank you. Error while burning bootloader. |
Hi..just discovered another thing....The Atmega that don't initialize it's an Atmega128A AU...This can be written only with avrispmkII. Why ? I don't know...On an other board I have two avr chips, Atmega128 16AU |
I am getting similar errors. I had kind of given up on this. But if it helps. `/Users/mac1/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino8/bin/avrdude -C/Users/mac1/Library/Arduino15/packages/MegaCore/hardware/avr/1.0.5/avrdude.conf -v -patmega128 -cusbtiny -e -Ulock:w:0x3f:m -Uefuse:w:0xff:m -Uhfuse:w:0xc6:m -Ulfuse:w:0b10111111:m avrdude: Version 6.3, compiled on Dec 16 2016 at 13:32:25
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 020:008
avrdude: programmer operation not supported avrdude: Using SCK period of 10 usec avrdude done. Thank you. Error while burning bootloader.` |
Hi again..Well, it seems that usbtiny is very sensitive to loads on the PE0,PE1 pins and the avrispmkII seems to be more "tanky".Put a 1k resistor in series with PE0, solved the problem with avr device initialisation..Everything work fine now, despite those "content mismatch" & "programmer unsuported" messages. Thanks Hans for all this core... |
Ok, so I also added the 1K resistor. `/Users/mac1/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino8/bin/avrdude -C/Users/mac1/Library/Arduino15/packages/MegaCore/hardware/avr/1.0.5/avrdude.conf -v -patmega128 -cusbtiny -e -Ulock:w:0x3f:m -Uefuse:w:0xff:m -Uhfuse:w:0xc6:m -Ulfuse:w:0b10111111:m avrdude: Version 6.3, compiled on Dec 16 2016 at 13:32:25
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 020:010
avrdude: programmer operation not supported avrdude: Using SCK period of 10 usec Reading | ################################################## | 100% 0.00s avrdude: Device signature = 0x1e9702 (probably m128) Writing | ################################################## | 100% 0.00s avrdude: 1 bytes of lock written Reading | ################################################## | 100% 0.00s avrdude: verifying ... Writing | ################################################## | 100% 0.00s avrdude: 1 bytes of efuse written Reading | ################################################## | 100% 0.00s avrdude: verifying ... Writing | ################################################## | 100% 0.00s avrdude: 1 bytes of hfuse written Reading | ################################################## | 100% 0.00s avrdude: verifying ... Writing | ################################################## | 100% 0.00s avrdude: 1 bytes of lfuse written Reading | ################################################## | 100% 0.00s avrdude: verifying ... avrdude done. Thank you. /Users/mac1/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino8/bin/avrdude -C/Users/mac1/Library/Arduino15/packages/MegaCore/hardware/avr/1.0.5/avrdude.conf -v -patmega128 -cusbtiny -Uflash:w:/Users/mac1/Library/Arduino15/packages/MegaCore/hardware/avr/1.0.5/bootloaders/optiboot_flash/atmega128/optiboot_flash_atmega128_115200_16000000L.hex:i -Ulock:w:0x0f:m avrdude: Version 6.3, compiled on Dec 16 2016 at 13:32:25
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 020:010
avrdude: programmer operation not supported avrdude: Using SCK period of 10 usec Reading | ################################################## | 100% 0.00s avrdude: Device signature = 0x1e9702 (probably m128) Writing | ################################################## | 100% 0.00s avrdude: 131072 bytes of flash written Reading | ################################################## | 100% 0.00s avrdude: verifying ... avrdude done. Thank you. Error while burning bootloader.` It throws an error about burning bootloader. |
Woah, thats great! the last error (avrdude: verification error; content mismatch) is a USBtinyISP related, and is nothing to worry about. The USBtinyISP doesn't actually support devices with more than 64kB, but works fine on the ATmega128 despite the error. Your ATmega128 should now have a boatloader, and the LED connected to PB5 should flash twice every second or so. |
One more success story here. The led is happy blinking... (It seems I did something early which led to the led getting burnt out.) More power to you Hans. |
I can confirm the bootloader on 128A is ok, and it can be programmed succesfully via an FTDI ( in my case, an FTDI 232RL onboard mounted).Have a nice weekend, mates.. |
hi MCUdude |
{{ I already opened a thread at https://forum.arduino.cc/index.php?topic=425844.0 but then realized this might be the better place... }}
Hi,
I followed the exact circuit as noted https://camo.githubusercontent.com/b6046ccf5b261d6accdf030c2158ddb119f898d8/687474703a2f2f692e696d6775722e636f6d2f5549696e6f38492e706e67
But I get errors (or simply time out) while uploading.
I tried uploading the bootloader using a genuine Arduino Uno as SPI programmer. And just to experiment, I tried uploading bootloader using a USB to TTL serial connection.
No luck so far.
Is there any specific programmer that is known to work? There are conflicting notes on USBTiny. Seems it is better than USBasp but only works for Atmega64... Or I am just reading too much and not putting things in correct order?
Any inputs will be greatly appreciated.
Thanks.
The text was updated successfully, but these errors were encountered: