Uploading problem with Arduino

Support for Bloader and Screamer

Moderator: phalanx

Uploading problem with Arduino

Postby dimkasta » Tue Sep 29, 2009 4:25 pm

I think I have locked my arduino pro (3.3v) by accidentally making the sketch spam the serial port.

I am now getting the following error while trying to upload a new one.

Code:

Code: Select all
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x00
avrdude: failed to write flash memory, rc=-4
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x00



Is this because of the serial port spamming, or is the board buggy?

Is there a way to clear the flash memory without losing the bootloader?
If not, how would you suggest that I handle the problem?

The FTDI chip works normally with another board I have.
dimkasta
 
Posts: 14
Joined: Mon Aug 24, 2009 1:21 pm

Postby lehmanna » Tue Sep 29, 2009 10:37 pm

You can simply use the Arduino environment to reprogram the bootloader. Just make sure you select the correct model before commencing.
Regards,
Alexander
lehmanna
 
Posts: 74
Joined: Sat Jul 25, 2009 3:21 am

Postby dimkasta » Tue Sep 29, 2009 11:57 pm

That is really helpful mate thanks.

How do I do it? Do I need an ISP programmer? Any links?
Thanks again
dimkasta
 
Posts: 14
Joined: Mon Aug 24, 2009 1:21 pm

Postby lehmanna » Wed Sep 30, 2009 12:07 am

Yes, you'll need a programmer. You might want to give this one a shot. (Note the line on the page that says that some OS X and/or Linux users have had their problems with this device. In this case, you could try the USBtiny ISP or the AVR ISP mkII instead.)

However, it's quite unprobable that you accidently destroyed the Arduino's bootloader. The bootloader is usually protected through the corresponding lock fuses of the ATmega. On the other hand, I have no explanation for your device's behaviour.
Regards,
Alexander
lehmanna
 
Posts: 74
Joined: Sat Jul 25, 2009 3:21 am

Postby dimkasta » Wed Sep 30, 2009 12:49 am

Is there a way to delete only the sketch and not the bootloader?
dimkasta
 
Posts: 14
Joined: Mon Aug 24, 2009 1:21 pm

Postby lehmanna » Wed Sep 30, 2009 1:01 am

Hm, you could try to do a chip erase using, for example, avrdude, yet that could result into the bootloader being erased as well.

Anyway, an actual ISP comes in handy quite often, so I suggest getting one. And, btw, make yourself familiar with the setting of fuses before trying to flash anything manually. As long as you use the Arduino environment to burn the bootloader, however, there's no need to worry about fuses whatsoever.
Regards,
Alexander
lehmanna
 
Posts: 74
Joined: Sat Jul 25, 2009 3:21 am

Postby dimkasta » Wed Sep 30, 2009 3:49 am

Any suggestion on a programmer that works with arduino ide?

Thanks a lot for your help mate
dimkasta
 
Posts: 14
Joined: Mon Aug 24, 2009 1:21 pm

Postby lehmanna » Wed Sep 30, 2009 4:03 am

As far as flashing the bootloader is concerned, every ISP, for example the ones I've already mentioned before, should work perfectly.

Aside from flashing the bootloader, note that although the Arduino environment has been designed to communicate with your device via USB or serial ports (which includes Bluetooth as well), it simply hides its own use of avrdude. See, the bootloader software pretends to be a programming device like the external ones, so that avrdude is able to communicate with your Arduino as if it were a an actual ISP.
Regards,
Alexander
lehmanna
 
Posts: 74
Joined: Sat Jul 25, 2009 3:21 am

Postby gskellig » Mon Nov 02, 2009 12:44 am

Sorry for bumping an old thread but I have exactly the same problem with my Seeeduino. Except it had the problem right out of the box. Is flashing the 328 the only way of fixing this problem? I'm cheap and don't really feel like forking out $30 to buy an ISP programmer, plus I have absolutely no idea how to use one.
gskellig
 
Posts: 1
Joined: Mon Nov 02, 2009 12:31 am


Return to Boot Loading

Who is online

Users browsing this forum: No registered users and 1 guest