Skip to main content

Messages

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

Messages - 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
Hardware biz / Re: testing and compliance
This is a good question.  There needs to be clear understanding of what a "finished product" means.  I don't mean clear understanding among electronics enthusiasts, but I mean a legally-backed definition.  Initially I was going to argue if there is no precedence, it might be time to push for one.  However, if the EU considers "motherboards" as a finished product, perhaps a precedence already exists.
3
AVRDude / Another avrdude: initialization failed, rc=-2
If it happens again, I'll take better notes.  However, I have been using the BP the past couple of days to debug a new PCB and haven't had any issues with avrdude since it started working.
4
AVRDude / Re: Another avrdude: initialization failed, rc=-2
I'm not sure I understand why this made a difference.  Ian, since you suggested that it could be the latest version of AVRdude, I decided to try older versions.

Started with 5.8 which didn't have the buspirate option.  Went to 5.9 which worked and as it turns out now so does 5.10 and 5.11.  I did a make uninstall in between versions.  I'm not sure why AVRdude is communicating now.
5
AVRDude / Re: Another avrdude: initialization failed, rc=-2
I should mention, I also ran with the -F override, which yields:

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: initialization failed, rc=-2
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
6
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.01312329752session_write_close ( )...(null):0
20.01352461352ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01352462128Database_MySQL->query( ).../DatabaseHandler.php:119
40.05942600872Database_MySQL->error( ).../Db-mysql.class.php:273