ytram99
Posts: 29
Joined: Thu Dec 13, 2012 9:07 pm

Arduino IDE on Gertboard failed

Tue Jul 29, 2014 7:48 pm

I was doing some programming using Arduino IDE to program the ATmega chip on the Gertboard. I was getting unexpected results - then I found I could no longer upload. I received the following error message:
"avrdude: AVR device not responding
avrdude: initialization failed. rc=-1"

Just a few minutes previously, it had at least uploaded.

I noted that the bottom of the IDE window said:
" Gertboard with ATmega328(GPIO) on COM1". Shouldn't say "on dev/tty/ama0"?

I use "upload with programmer'..Under tools, the correct device is selected. Under tools, choice of serial port is grayed out.

Would appreciate any help getting this back working. - Thanks.

User avatar
Gert van Loo
Posts: 2474
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Arduino IDE on Gertboard failed

Wed Jul 30, 2014 7:33 am

The upload is using the SPI port.
The serial port is never used so it does not matter if it says COM or TTY

The Atmel device is know to stop responding occasionally.
The reason is unknown to me.
Here is somebody else who had the same problem and I never found our if it was resolved:
http://www.raspberrypi.org/forums/viewt ... 42&t=37424

Sorry I can't be of any more help to you.

ytram99
Posts: 29
Joined: Thu Dec 13, 2012 9:07 pm

Re: Arduino IDE on Gertboard failed

Wed Jul 30, 2014 4:13 pm

More information:
My sketch had PB5 connected to PB4. When I removed this connection the sketch uploaded. If I then reconnected PB5 to PB4, after uploading, the sketch worked OK.

I unplugged all wires and jumpers and reconnected everything. Unplugged Gertboard from Pi and reconnected. No help. Sketch uploaded only with PB4 disconnected from PB5. Tried other combination of pins with the same result.

Ran AVRSETUP. This failed saying it received the wrong signature from Atmega328P. Installed new ATmega328 chip and reran AVRSETUP. Same bad result with the new chip.

Going to try some more troubleshooting. Perhaps oscillator frequency is off. Connections from Pi to Gertboard to ATmega chip are pretty simple - hard to imagine problems - except possibly with software.

Thought about re installing all Arduino and Gertboard software, but I have had some other unexplained problems with Pi. Therefore, I'm going to start over from scratch with a new SD card, - loading operating system and then all Gertboard software.

I'm now waiting for SD card to come in mail. In the meantime, I'll connect Pi to Arduino Uno by USB and see if that works OK.

I'll keep you posted at to what I find.

Marty Lyon

ytram99
Posts: 29
Joined: Thu Dec 13, 2012 9:07 pm

Re: Arduino IDE on Gertboard failed

Sat Aug 02, 2014 7:23 pm

As I said, I would report further developments.

Belatedly, I pulled out the Gertboard schematics and found by connecting PB4 to PB5, I had shorted MISO to SCK - no wonder the upload failed.

Just removing the connection between PB4 and PB5, however, did not fix the problem. I still received AVRDUDE errors. Even avrsetup failed. I started from scratch with a new Linux distribution and Arduino software on new SD card. Even with all new software, I still received avrdude errors.

Then, magically, all started to work OK. No more avr errors with the new distro (Raspbian,) or with the old distro (Occidentals).

Crazy.

Thanks,
Marty







What I

Return to “Add-ons”

Who is online

Users browsing this forum: No registered users and 6 guests