Skip to main content

Topics

This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.

Topics - jamesC4S

1
AVRDude / Programming Arduino Bootloader takes 10+ Minutes
Programming an arduino bootloader on an ATmega328 is taking on the order of 10-15 minutes to complete.

Here's the command I'm using:
avrdude -patmega328p -c buspirate -P /dev/tty.usbserial-A6005lHR -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m -U flash:w:optiboot_atmega328.hex

Here's the initial output:

Code: [Select]
Detecting BusPirate...
** 
**  Bus Pirate v3b
**  Firmware v5.10 (r559)  Bootloader v4.4
**  DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
**  http://dangerousprototypes.com
**
BusPirate: using BINARY mode
avrdude: AVR device initialized and ready to accept instructions

Any ideas why it is taking so long?  Have I missed something?
2
AVRDude / Another avrdude: initialization failed, rc=-2
I have a PCB coming back with a TQFP ATmega328.  I was hoping to program it using the bus pirate.  As a practice run, I thought I'd try programming my Arduino Uno's ATmega328. 

I have connected all of the signals between the bus pirate and the arduino's ISP header with jumper wires.  I have rechecked the connections multiple times.  From the BP, I can hold the Arduino in reset.  I can also control it with the power supply commands.  These steps have given me some confidence that I didn't get confused on the connections.  I have also tried (as a troubleshooting step) of swapping MOSI and MISO.

Ignoring the Arduino IDE for a moment, here is the output I am getting from avrdude:
Code: [Select]
james-MBP2b:~ james$ avrdude -c buspirate -P /dev/tty.usbserial-A6005lHR -p m328p -v

avrdude: Version 5.11.1, compiled on Oct 21 2011 at 22:58:36
        Copyright (c) 2000-2005 Brian Dean,
        Copyright (c) 2007-2009 Joerg Wunsch

        System wide configuration file is "/usr/local/etc/avrdude.conf"
        User configuration file is "/Users/james/.avrduderc"
        User configuration file does not exist or is not a regular file, skipping

        Using Port                    : /dev/tty.usbserial-A6005lHR
        Using Programmer              : buspirate
        AVR Part                      : ATMEGA328P
        Chip Erase delay              : 9000 us
        PAGEL                        : PD7
        BS2                          : PC2
        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    20    4    0 no      1024    4      0  3600  3600 0xff 0xff
          flash        65    6  128    0 yes    32768  128    256  4500  4500 0xff 0xff
          lfuse          0    0    0    0 no          1    0      0  4500  4500 0x00 0x00
          hfuse          0    0    0    0 no          1    0      0  4500  4500 0x00 0x00
          efuse          0    0    0    0 no          1    0      0  4500  4500 0x00 0x00
          lock          0    0    0    0 no          1    0      0  4500  4500 0x00 0x00
          calibration    0    0    0    0 no          1    0      0    0    0 0x00 0x00
          signature      0    0    0    0 no          3    0      0    0    0 0x00 0x00

        Programmer Type : BusPirate
        Description    : The Bus Pirate

Detecting BusPirate...
avrdude: buspirate_readline(): #
avrdude: buspirate_readline(): RESET
avrdude: buspirate_readline():
** 
avrdude: buspirate_readline(): Bus Pirate v3b
**  Bus Pirate v3b
avrdude: buspirate_readline(): Firmware v5.10 (r559)  Bootloader v4.4
**  Firmware v5.10 (r559)  Bootloader v4.4
avrdude: buspirate_readline(): DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
**  DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
avrdude: buspirate_readline():
** 
avrdude: buspirate_readline(): HiZ>
**
BusPirate: using BINARY mode
BusPirate binmode version: 1
BusPirate SPI version: 1
avrdude: initialization failed, rc=-2
        Double check connections and try again, or use -F to override
        this check.

BusPirate is back in the text mode

avrdude done.  Thank you.

BP's Self-test passes with 0 errors.

Host is running OSX 10.6.8.

I'm open to suggestions on how to make this work.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01172285064session_write_close ( )...(null):0
20.01202416656ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01202417432Database_MySQL->query( ).../DatabaseHandler.php:119
40.05692556168Database_MySQL->error( ).../Db-mysql.class.php:273