32u4 avrdude returns blank programmer id

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I've made a clone of the adafruit feather 32u4.  Modified the LUFA CDC Class example project and was able to load the hex with FLIP.  After the board restart, it was recognized as a virtual com port (COM9).  

I was able to load the driver file that was generated.

 

Assuming that it's now behaving like an Arduino with the virtual com port.  I wanted to upload my code.

When I tried to upload, avrdude kept giving timeout errors.

Manually checking the logs.

 

LOGs:

avrdude -p m32u4 -c AVR109 -P COM9 -v

 

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

 

         Using Port                    : COM9
         Using Programmer              : AVR109
         avr910_devcode (avrdude.conf) : none
         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 : avr910
         Description     : Atmel AppNote AVR109 Boot Loader

 

Connecting to programmer: .
Found programmer: Id = "@ e"; type =
    Software Version = D. ; Hardware Version = ≡.∩
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?

Noticing that the programmer id is blank/"@ e" concerned me.  As several other threads on the forum has the Programmer ID as LUFACDC or a programmer from avrdude (i.e. AVRISPmkII).

 

Note:

DEVICE_STATE_AS_GPIOR  in the LUFAconfig.h was commented out.  I've just set this to 0.

 

Questions regarding the programmer id:

  • Is that a variable in the project?
  • Is this set by the driver?
  • Should I change the PID and VID to the adafruit feather 32u4?

 

Thanks.

Last Edited: Fri. Jul 12, 2019 - 07:38 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Should I be using the CDC Bootloader instead?

 

I tried this using the 32kb 4kb CDC bootloader, and at first I got the optimization error.  Corrected this by setting Optimization to -Os (optimization by size) with Optimization flag:  -fdata-sections; project has a clean build.  

When I tried to program the board now, I kept getting Verifying Flash...Failed! address=0x7000 expected=0x55 actual=0x0c

 

Any advice would help.  

Last Edited: Mon. Jul 15, 2019 - 07:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How are the 32U4 fuses set? Do you have BOOTRST or HWBE ?

 

If it is BOOTRST then it should start into the bootloader at every power on and presumably it then enumerates as the bootloader class device?

 

If it uses HWBE then how it starts will depend on the state of the HWB pin. You need to pull it active to have it start into the bootloader and enumerate as that class. Otherwise it will start into the app and enumerate as that class instead.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you want to clone an Adafruit Feather 32U4 you should copy the pcb layout and components.

 

Select Feather_32U4.   Use the Arduino IDE to Burn the Bootloader with external Programmer.

 

You will then have hardware and software that is identical to the Adafruit product.

 

I have never even seen a Feather.   Nor have I studied the firmware docs.

I doubt if you can use the Factory DFU bootloader that comes with the chip.

I suggest that you use an external programmer as a one-off.

 

But the important advice is:  Use the Arduino IDE to Burn Bootloader

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

If you want to clone an Adafruit Feather 32U4 you should copy the pcb layout and components.

 

Select Feather_32U4.   Use the Arduino IDE to Burn the Bootloader with external Programmer.

 

You will then have hardware and software that is identical to the Adafruit product.

 

I have never even seen a Feather.   Nor have I studied the firmware docs.

I doubt if you can use the Factory DFU bootloader that comes with the chip.

I suggest that you use an external programmer as a one-off.

 

But the important advice is:  Use the Arduino IDE to Burn Bootloader

 

David.

 

I'll try this out.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

How are the 32U4 fuses set? Do you have BOOTRST or HWBE ?

 

If it is BOOTRST then it should start into the bootloader at every power on and presumably it then enumerates as the bootloader class device?

 

If it uses HWBE then how it starts will depend on the state of the HWB pin. You need to pull it active to have it start into the bootloader and enumerate as that class. Otherwise it will start into the app and enumerate as that class instead.

 

Since I cloned the pcb layout, the HWBE pin is connected to VCC (3.3v).  I can't lift the pin, it's too small.

 

I get this error or a board that I haven't programmed.  

Flash...Failed! address=0x7000 expected=0x55 actual=0x0c

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bhandoor wrote:
Since I cloned the pcb layout, the HWBE pin is connected to VCC (3.3v).
Well that is OK as long as the fuses are set to use BOOTRST. But if you were relying on HWB then hard wiring the pin is an error.

 

If it does use BOOTRST then you probably don't want it to enumerate as the bootloader USB class at every power on so then you would need some kind of "trigger code" in the bootloader to only go on to enumerare as DFU or CDC or whatever if bootloading has been triggered.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have never looked at the Feather drawings.   But my advice remains the same.    COPY THE PROVEN DESIGN.

 

Likewise.   I have not looked at the Feather legal standing or copyright.    If your board is for private use you can copy whatever you like.

If you intend to sell commercially,   I would ask Adafruit first.

 

It always seems wise to let other people make the hardware mistakes first.    Then use the final design that has been proven in the field.

 

In other words.   Copy Feather pcb layout, firmware and fuses.

 

David.