Skip to main content
Topic: Avrdude + Buspirate on Raspberry Pi (Read 3708 times) previous topic - next topic

Avrdude + Buspirate on Raspberry Pi

Hello,

I am trying to setup by Raspberry Pi to flash some AVRs using AVRDude and an Arduino.

I am using the latest Raspbian:
Code: [Select]
Linux raspberrypi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux

Let's install avrdude `sudo apt-get install avrdude`, which installs version 5.11.1.

Now let's try to get some information from the AVR:

Code: [Select]
pi@raspberrypi ~ $ avrdude -p atmega1284p -c buspirate -P /dev/ttyUSB0 -v

avrdude: Version 5.11.1, compiled on May 23 2012 at 11:08:25
        Copyright (c) 2000-2005 Brian Dean
        Copyright (c) 2007-2009 Joerg Wunsch

        System wide configuration file is "/etc/avrdude.conf"
        User configuration file is "/home/pi/.avrduderc"
        User configuration file does not exist or is not a regular file, skipping

        Using Port                    : /dev/ttyUSB0
        Using Programmer              : buspirate
        AVR Part                      : ATMEGA1284P
        Chip Erase delay              : 9000 us
        PAGEL                        : PD7
        BS2                          : PA0
        RESET disposition            : dedicated
        RETRY pulse                  : SCK
        serial program mode          : yes
        parallel program mode        : yes
        Timeout                      : 200
        StabDelay                    : 100
        CmdexeDelay                  : 25
        SyncLoops                    : 32
        ByteDelay                    : 0
        PollIndex                    : 3
        PollValue                    : 0x53
        Memory Detail                :

                                  Block Poll              Page                      Polled
          Memory Type Mode Delay Size  Indx Paged  Size  Size #Pages MinW  MaxW  ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          eeprom        65    10  128    0 no      4096    8      0  9000  9000 0xff 0xff
          flash        65    10  256    0 yes    131072  256    512  4500  4500 0xff 0xff
          lock          0    0    0    0 no          1    0      0  9000  9000 0x00 0x00
          lfuse          0    0    0    0 no          1    0      0  9000  9000 0x00 0x00
          hfuse          0    0    0    0 no          1    0      0  9000  9000 0x00 0x00
          efuse          0    0    0    0 no          1    0      0  9000  9000 0x00 0x00
          signature      0    0    0    0 no          3    0      0    0    0 0x00 0x00
          calibration    0    0    0    0 no          1    0      0    0    0 0x00 0x00

        Programmer Type : BusPirate
        Description    : The Bus Pirate

Detecting BusPirate...
avrdude: buspirate_readline(): #
avrdude: buspirate_readline(): RE
avrdude: buspirate_readline(): Bus Pirate v3.5
avrdude: buspirate_readline(): Firmware v6.1 r1676  Bootloader v4.4
avrdude: buspirate_readline(): DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)
avrdude: buspirate_readline(): http://dangerousprototypes.com
avrdude: buspirate_readline(): HiZ>�����������������������������������������������������������������������������������������������
avrdude: buspirate_readline(): ���������������������������������������������������������������������������������������������������

Then it hangs and keeps spitting this "���" garbage indefinitely.

Buspirate's console works fine, I can type `screen /dev/ttyUSB0 115200` and operate there.

Any idea why this could be?

Re: Avrdude + Buspirate on Raspberry Pi

Reply #1
I have never tried the bus pirate on a pi before, but my first guess would be a power supply problem. Insufficient power causes many problems on the pi. If you can, try a different wall wart.

gl&hf

Re: Avrdude + Buspirate on Raspberry Pi

Reply #2
[quote author="mrmr"]I have never tried the bus pirate on a pi before, but my first guess would be a power supply problem. Insufficient power causes many problems on the pi. If you can, try a different wall wart.

gl&hf[/quote]

Tried with different configurations:

- Several USB chargers as RPi power supply.
- Buspirate connected directly to Rpi usb
- Buspirate connectec to Rpi through an external, self-powered usb hub.

Nothing, always hangs in the same position :(

Re: Avrdude + Buspirate on Raspberry Pi

Reply #3
Upgrade buspirate to the latest firmware, then build avrdude 6.01. I had the same problem that you describe, after I did this, everything worked fine and much faster for reads and writes.