Memorial day is 05/25/2015 – Orders will ship out on May 26th. There will not be any deliveries or shipping on Monday. Any order placed after 11am ET on Friday May 22nd will not start to ship out until Tuesday May 26th.

atmega32u4 breakout wont enumerate...
Moderators: adafruit_support_bill, adafruit

atmega32u4 breakout wont enumerate...

by niknak on Tue Sep 25, 2012 8:13 am

Hello all.
I'm having some issues with the atmega32u4 breakout board.
Perhaps someone here might be able to help?

I purchased this back in November 2011, so i think originally it was runing the leonardo bootloader.
Since its been a while, I checked out the latest bootloader from ada's github repo.

https://github.com/adafruit/Atmega32u4-Breakout-Board/blob/master/BootloaderCDC.hex

i then used my buspirate to write that new bootloader to the atmega32u4. Output is below:
Code: Select all | TOGGLE FULL SIZE
~/git/micro/atmega32u4/Atmega32u4-Breakout-Board: master ✖  avrdude -c buspirate -p m32u4 -P /dev/tty.usbserial-A900F4DA  flash:w:BootloaderCDC.hex

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

Reading | ################################################## | 100% 0.10s

avrdude: Device signature = 0x1e9587

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

~/git/micro/atmega32u4/Atmega32u4-Breakout-Board: master ✖  avrdude -c buspirate -p m32u4 -P /dev/tty.usbserial-A900F4DA  -U flash:w:BootloaderCDC.hex

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

Reading | ################################################## | 100% 0.10s

avrdude: Device signature = 0x1e9587
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "BootloaderCDC.hex"
avrdude: input file BootloaderCDC.hex auto detected as Intel Hex
avrdude: writing flash (32442 bytes):

Writing | ################################################## | 100% 1044.99s

avrdude: 32442 bytes of flash written
avrdude: verifying flash memory against BootloaderCDC.hex:
avrdude: load data flash data from input file BootloaderCDC.hex:
avrdude: input file BootloaderCDC.hex auto detected as Intel Hex
avrdude: input file BootloaderCDC.hex contains 32442 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1037.05s

avrdude: verifying ...
avrdude: 32442 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.


Avrdude is so polite!

Now.. here's my problem: When i plug in my breakout board, the power light is on, the green boot light is "breathing", but my mac won't enumerate the device.

Its not showing up in /dev/tty.usb* and when i checked the system log i found this:

Code: Select all | TOGGLE FULL SIZE
9/25/12 7:05:25.000 AM kernel: USBF:   8849.711   [0xffffff802033f600] The IOUSBFamily is having trouble enumerating a USB device that has been plugged in.  It will keep retrying.  (Port 2 of Hub at 0xfd100000)
9/25/12 7:05:28.000 AM kernel: USBF:   8852.713   [0xffffff802033f600] The IOUSBFamily was not able to enumerate a device.


I've tried writing the bootloader again just to make sure, but with the same result.

I'm stuck. :(
User avatar
niknak
 
Posts: 3
Joined: Tue Aug 02, 2011 10:50 am

Re: atmega32u4 breakout wont enumerate...

by niknak on Tue Sep 25, 2012 8:27 am

thought this might prove helpful as well: this is the results of running avrdude with verbose output:

Code: Select all | TOGGLE FULL SIZE
~/git/micro/atmega32u4/Atmega32u4-Breakout-Board: master ✖  avrdude -c buspirate -p m32u4 -P /dev/tty.usbserial-A900F4DA  -v

avrdude: Version 5.11, compiled on Nov 10 2011 at 19:19:04
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

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

         Using Port                    : /dev/tty.usbserial-A900F4DA
         Using Programmer              : buspirate
         AVR Part                      : ATmega32U4
         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     8    0 no       1024    8      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 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
           lock           0     0     0    0 no          1    0      0  9000  9000 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(): http://dangerousprototypes.com
**  http://dangerousprototypes.com
avrdude: buspirate_readline(): HiZ>
**
BusPirate: using BINARY mode
BusPirate binmode version: 1
BusPirate SPI version: 1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.10s

avrdude: Device signature = 0x1e9587
avrdude: safemode: lfuse reads as DE
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as CB

avrdude: safemode: lfuse reads as DE
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as CB
avrdude: safemode: Fuses OK
BusPirate is back in the text mode

avrdude done.  Thank you.
User avatar
niknak
 
Posts: 3
Joined: Tue Aug 02, 2011 10:50 am

Re: atmega32u4 breakout wont enumerate...

by adafruit_support_bill on Tue Sep 25, 2012 9:53 am

You might try a different port. Preferably not a USB 3.0 port. If you don't have any USB 2.0 ports, try connecting through a USB 2.0 hub.

adafruit_support_bill
 
Posts: 37487
Joined: Sat Feb 07, 2009 10:11 am

Re: atmega32u4 breakout wont enumerate...

by westfw on Tue Sep 25, 2012 10:44 am

Are the fuses and lock bits correct? Your avrdude log doesn't show the explicit setting of fuses that is normally done when programming a bootloader. to ensure things like the boot area start address being set appropriately.
You can find the expected settings in the Makefile. Looks like:
Code: Select all | TOGGLE FULL SIZE
$(AVRDUDE) $(AVRDUDE_FLAGS) -U lfuse:w:0xFC:m -U hfuse:w:0xD0:m -U efuse:w:0xF3:m
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
$(AVRDUDE) $(AVRDUDE_FLAGS) -U lock:w:0x2F:m
User avatar
westfw
 
Posts: 1373
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: atmega32u4 breakout wont enumerate...

by niknak on Tue Sep 25, 2012 11:05 am

Thanks guys,
I'll give it another go tonight and post the results! :)
User avatar
niknak
 
Posts: 3
Joined: Tue Aug 02, 2011 10:50 am