Atmega32u4 Breakout Board Leonardo Driver Issues

Breakout boards, sensors, Drawdio, Game of Life, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby dencohe » Tue Dec 06, 2011 4:18 pm

hello,
I can confirm this oddness. Once I updated the belt sketch to the 32u4 breakout on a mac, when I brought the device over to my windows vista 64 bit laptop, it decided that it can start and the driver works.
Except now the only problem is I get this
avrdude: stk500_getsync(): not in sync: resp=0x00

So it still is unresponsive to the arduino program, but the computer believes it can talk to it.
dencohe
 
Posts: 5
Joined: Mon Dec 05, 2011 9:12 am

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby vtluu » Tue Dec 06, 2011 7:33 pm

Thanks Sean. I tried to connect the BB to a WinXP 32-bit VM (via VMWare Player) yesterday, and wasn't able to get the .INF driver installed, so I'll be sure to try yours tonight.

I'm curious why you did all that wiring to your USBtinyISP rather than just connecting directly to the BB's 6-pin header (which worked just fine for me)?
vtluu
 
Posts: 6
Joined: Thu Nov 10, 2011 11:48 am
Location: San Jose, CA, USA

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby vtluu » Wed Dec 07, 2011 12:53 am

Tried the modified .inf driver in my Win32 VM. The device is recognized but... I get the except same error: "The device cannot start." :(

I've got a couple other devices (Arduino Nano, Teensy) so I'm going to give up on the BB for now, though I'll keep a tab here in case anyone figures out something.
Viet-Tam Luu (a.k.a. "Tam")
vtluu
 
Posts: 6
Joined: Thu Nov 10, 2011 11:48 am
Location: San Jose, CA, USA

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby bigmessowires » Wed Dec 07, 2011 10:15 am

Maybe try the original AVR109 bootloader instead of the Leonardo bootloader? The links to it are at the bottom of the product page: http://ladyada.net/products/atmega32u4breakout/
bigmessowires
 
Posts: 59
Joined: Sun Jun 05, 2011 6:34 pm
Location: San Francisco

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby Daanii » Wed Dec 07, 2011 11:44 pm

I'm having the same trouble as others in getting the drive installed for the Arduino Leonardo bootloader.

I'm running Windows 7. In Device Manager, I get an exclamation point next to "Arduino Leonardo bootloader" under "Other devices". When I try to update the driver, it does not find the "Arduino Leonardo.inf" file in the folder I tell it to check. Nor does it find any driver automatically.

Any ideas?
Daanii
 
Posts: 15
Joined: Wed Jan 20, 2010 11:58 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby adafruit » Thu Dec 08, 2011 9:19 pm

we have a few ideas of what could help
first up anyone with x64 vista/7 - try booting up in test mode
http://windows.microsoft.com/en-US/wind ... -safe-mode
press F8
then try to install the driver and upload something to the board such as this sketch

Code: Select all
void setup() {               
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(7, OUTPUT);     
}

void loop() {
  digitalWrite(7, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(7, LOW);    // set the LED off
  delay(1000);              // wait for a second
}
User avatar
adafruit
 
Posts: 10546
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby Adrastos » Thu Dec 08, 2011 10:13 pm

I can confirm that at least for me, the method used by Seannerd more or less worked for me (however, I did everything in Win7x64).

Basically:
  • Using UsbTinyISP, I reflashed the Atmega32u4 using the bootloader that ships with Arduino-1.0 (arduino-1.0\hardware\arduino\bootloaders\diskloader\DiskLoader-Leonardo.hex):
    Code: Select all
    avrdude -c usbtiny -p atmega32u4 -U flash:w:DiskLoader-Leonardo.hex
  • Use modified .inf file (change "%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0034&MI_00" to "%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0034&MI_00, USB\VID_2341&PID_0034&Rev_0100, USB\VID_2341&PID_0034" in both places that it shows up.
  • In Device Manager, right click -> Update Driver Software on the non-working "Arduino Leonardo bootloader" entry -> Browse my computer for driver software -> select the folder containing the drivers (arduino-1.0\drivers) -> accept unsigned w/e, installed fine (got "COM9").
  • Open up Arduino-1.0, load the blink sketch and change LED pin to 7 (the green LED on the board), make sure to select "Arduino Leonardo" as the board and the COM port you just got ("COM9" in my case)
  • Uploaded fine, LED started blinking as expected
  • A couple of seconds later windows recognized a new device.. installed USB composite device, human interface device, and a new COM port for it ("COM10" now for me). COM port that it originally gave me is gone ("COM9"), but things seem to be working now.

I haven't ever done any USB work before so I can't really test if the HID is actually working or not (I got the board to experiment with this sort of stuff!), but for now things seem to be ok.
User avatar
Adrastos
 
Posts: 45
Joined: Wed Sep 30, 2009 9:37 pm


Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby Daanii » Sat Dec 10, 2011 12:34 am

I tried installing the driver in safe mode. That made no difference. For some reason Windows 7 cannot "find" the Leonardo driver, even though it is in the folder I browsed to.

Unfortunately, I do not have the skill needed to reflash the bootloader, so I'm stumped for now. That's too bad. I had high hopes for the Atmega32u4 breakout board. Its USB interface is just what I need for my project.

Any other boards available that I can use in its stead? I would just use an Arduino Uno, but I want something I can solder wires to some output pins, plus send data through the USB port.
Daanii
 
Posts: 15
Joined: Wed Jan 20, 2010 11:58 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby Adrastos » Sat Dec 10, 2011 11:34 pm

@Daanii you could try a Teensy: http://www.adafruit.com/products/199, http://www.pjrc.com/teensy/. It's got the same chip but you shouldn't have these problems.
User avatar
Adrastos
 
Posts: 45
Joined: Wed Sep 30, 2009 9:37 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby Seannerd » Sun Dec 11, 2011 12:29 pm

adafruit wrote:thats interesting and somewhat helpful but still terribly confusing - nothing in programming it with a new sketch should change the ability of 64 bit windows identifying it

I don't think it was the sketch - I think it was the bootloader. I agree that it is confusing - sorry if I was unclear. It wasn't entirely logical to me either. 32 bit should have nothing to do with it - perhaps because the laptop was so old and slow, something with timing worked better.

vtluu wrote:I'm curious why you did all that wiring to your USBtinyISP rather than just connecting directly to the BB's 6-pin header (which worked just fine for me)?


Because I'm a noob! I don't know what I was thinking - I thought that the 6 pin header was only for output to the LED strip or something. Doh!

Adrastos wrote:I can confirm that at least for me, the method used by Seannerd more or less worked for me (however, I did everything in Win7x64).


Did you do it all on the same machine? I still think it is confusing that reflashing worked unless the latest bootloader from adafruit has some difference in it from the stock one from Arduino. Is there supposed to be a difference at all between the two?

- Sean
Seannerd
 
Posts: 4
Joined: Thu Dec 02, 2010 6:17 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby barndoctors » Sun Dec 11, 2011 5:53 pm

Lots of frustration for lots of people with this issue. I too can't get past the "Code 10" problem while attempting to load the driver using 3 different operating systems. Can you summarize our options for returning the Atmega32u4 to Adafruit and getting you to install the driver for us? Thanks.
barndoctors
 
Posts: 2
Joined: Sun Dec 11, 2011 5:46 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby adafruit » Sun Dec 11, 2011 6:01 pm

barndoctors wrote:Lots of frustration for lots of people with this issue. I too can't get past the "Code 10" problem while attempting to load the driver using 3 different operating systems. Can you summarize our options for returning the Atmega32u4 to Adafruit and getting you to install the driver for us? Thanks.


which 3 different operating systems? what did you purchase and when did you purchase it?
drivers must be installed on a computer, we cannot install drivers remotely.
User avatar
adafruit
 
Posts: 10546
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby Daanii » Sun Dec 11, 2011 7:17 pm

I think barndoctors meant the bootloader rather than the driver.

I've tried to access the Atmega 32u4 breakout board through USB on Windows 7 (64-bit), Windows Vista (32-bit) and Windows XP (32-bit). On all of them I get the error:

"Windows was unable to install your Arduino Leonardo bootloader
"Windows could not find driver software for your device.
"If you know the manufacturer of your device, you can visit its website and check the support section for driver software."

That is after I "browse" the files to manually point to the Arduino 1.0 driver folder that contains a copy of Arduino Leonardo.inf

Is it the bootloader that comes on the Atmega 32u4 breakout board that causes the problem? I wish I had the skill to update the bootloader on the board, but I don't.

I appreciate Adrastos's suggestion to try the Teensy, but it's a little small for my application. The Atmega 32u4 breakout board would work a lot better. I need four of them, and just bought the one to start to see if it would work. But it did not work, and I see the breakout boards are back-ordered again anyway. It is a bit frustrating.
Daanii
 
Posts: 15
Joined: Wed Jan 20, 2010 11:58 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Postby bob_mct » Sun Dec 11, 2011 8:52 pm

I’ve read through a few of the postings here and a lot of the same problems in getting the Leonardo bootloader driver loaded and working for the Atmega32u4 Breakout Board. Below is a description of my system environment, the symptoms I experienced and my workarounds.

I am running Windows XP-Pro SP3. My AVR programmer is an AVRISPmkII and I am using AVR Studio 5. My version of the Arduino IDE is 1.0.

Before using the procedures below, I did the needed modification to the bootloader driver’s .inf file and was able to load the driver (after burning the Leonardo bootloader on the Atmega32u4). But the problem was getting the bootloader driver to work (I kept getting a code 10 error).

Overall, the weird thing you need is an application loaded onto the device after the Leonardo bootloader is also burned into “flash” memory. Others in this forum have been experiencing the same thing. Again this is what worked for me given the tools I had at my disposal.

Step 1: load the bootloader onto the ATmega32u4. There are a number of ways and programmers to do this, but given the tools I have on hand this is what I did.
1.a. Apply a 5V power source between the 5v and one of the GND pins on the breakout board.
1.b. Connect the AVRISPmkII programmer to the ATmega32u4 through the 6-pin isp breakout on the board. If your programmers firmware is up to date and the AVR Studio 5 is already loaded (with the AVRISPmkII’s drivers working) you should get a green light on the programmer.
1.c. Use AVR Studio 5 to burn the bootloader (….\arduino-1.0\hardware\arduino\bootloaders\diskloader\DiskLoader-Leonardo.hex ) into the program “flash” memory. To get to the programmer interface in AVR Studio 5 from the menu it is Tools->AVR Programming (make sure the right device is selected and target programming speed is around 64kHz). After burning the bootloader into “flash”, keep the programmer interface up for the next step.

Step 2: set the hardware and lock fuses for the ATmega32u4. I am not going to say that these are the right fuse settings, but they worked for me and they were based upon reading the datasheet and the boards.txt file. Word of warning here. For some boards you can actually “brick” your device (render it useless) with certain settings. So be careful here (if anyone else can comment about any risks that might be associated with this particular device and this board, please post something).
2.a. from the AVR programmer interface select the “fuses” link and program the following hex values for each of the hardware fuse registers:
Extended: 0xFB (boot.txt says “cb”, but the upper nibble does nothing according to the datasheet).
High: 0xD8
Low: 0xDE
2.b from the AVR programmer interface select the “Lock bits” link. Program the following hex value into the lock bits register:
LOCKBIT: 0xEF
I am pretty sure that what this does is set up the microcontroller up so that applications are not written over the bootloader that you just burned into the “flash”.

Step 3: burn application program into the device (without overwriting the bootloader). This is the weird workaround that many seem to have to do. I had to do this with AVR Studio 5 and a small AVRGCC C program in order to get the Leonardo bootloader to work in Windows XP. It is strange, but it seems like you have to have an application burned into the “flash” after the bootloader in order for the Leonard driver to work correctly with the operating system.
3.a. I started an new project in AVR Studio 5 for the ATmega32u4 and wrote a small variant of the “blink” program:

Code: Select all
#include <avr/io.h>
#include <avr/delay.h>

int main(void)
{
    // change the port pin to OUT
   DDRC = 1<<PC7;   
   PORTC = 1<<PC7;
   
    while(1)
    {
        //TODO:: Please write your application code
      _delay_ms(1000);
      PORTC = PORTC ^ (1<<PC7);  // TOGGLE THE BIT      
      
    }
}


3.b. Burn the program into the “flash” using the AVR Programmer interface (like you did with the bootloader in step 1. If you have the lock bits set up right, it will be burned in a different location in flash than the bootloader).

Step 4. Disconnect the AVRISBmkII programmer from the board, disconnect your 5V power source and connect an LED between C7 (according to my short program) and ground. Next reconnect the 5V power source. If everything is going right you should observe the following behavior.
4.a. Again reconnect the 5V power source if you have not done so already.
4.b. Press the reset button. For about 7-9 seconds the LED should toggle (glow) slowly, then blink fast after the 7-9 seconds. When the LED is toggling (glowing) slow, the bootloader is running. It runs for 7-9 seconds (and making the LED glow this way). After that, the application program kicks in (in this case just causing the LED to blink fast). If you are observing this behavior, I think this means that you successfully loaded the bootloader and the application.

Step 5. Before connecting anything to the USB port on your computer, you have to modify the .inf file for the driver.
5.a. Open “…\arduino-1.0\drivers\Arduino Leonardo.inf” in an editor (I used WordPad).
5.b Just like Adrastos and Seannerd, I modified as follows: change "%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0034&MI_00" to "%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0034&MI_00, USB\VID_2341&PID_0034&Rev_0100, USB\VID_2341&PID_0034" in both places that it shows up.
5.c. Save the .inf file and close your editor.

Step 6. Try to get the Leonardo driver loaded in Windows XP for this board. Now with the 5V power supply connected to the board, connect the board to your computer USB port.
6.a. Again, with 5V power supply connected to the board, connect to your computer USB port. If the LED is blinking fast, XP won’t detect the USB bootloader running through the USB connection, because the application is running.
6.b. Click the “reset” button on the board. Now you should hear the beep-bop on your XP machine and get prompted to load the “Arduino Leonardo bootloader”. Go through the familiar windows to do this so that the driver is searched for in “…\arduino-1.0\drivers”. Don’t worry about the 7-9 second duration that the bootloader runs and loosing the indications showing it has been detected in Device Manager. Just go through the windows to load the bootloader driver. It should load even after the devices stops running the bootloader and starts running the application program.
6.c. After the bootloader is done loading in XP, hit the reset button again on the board and look at the “Ports (COM & LPT)” devices detected. You should see your Arduino Leonardo listed without error indicators and assigned a COM port (at least while the bootloader is running)

Step 7. Compile and upload the Blink example from the Arduino 1.0 IDE. It takes a little coordination, but make sure you select the Arduino Leonardo as the “Board” and click the reset button on the board so you can select the right COM port (even though it will disappear in device manager in a few seconds). Again this may take a few times based upon when you click the upload button and when you click the reset button. After a successful upload, you will be prompted to reload the Arduino Leonardo bootloader. Yes, you have to reload the bootloader. After that, XP will recognize the device as an Arduino Leonardo with an assigned COM port as your Aruino IDE uploaded version of Blink is running.

I hope this helps shed some light on the problems in getting the driver to work in Windows environments. I don’t know, maybe it is just an XP thing.
bob_mct
 
Posts: 4
Joined: Sun Dec 11, 2011 8:39 pm

PreviousNext

Return to Other Adafruit products

Who is online

Users browsing this forum: No registered users and 3 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [114]

Raspberry Pi[82]
 
FLORA[24]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[12]
Arduino[60]
 
NETduino[14]
 
BeagleBone[23]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[39]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[9]


 
Breakout Boards[35]
LCDs & Displays[49]
Components & Parts[70]
Batteries & Power[54]
EL Wire/Tape/Panel[52]
LEDs[112]
 
Wireless[16]
Cables[66]
 
Lasers[6]
Sensors/Parts[147]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[41]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[25]


 
Stickers[41]
 
Skill badges[55]
 
Books[26]
 
Circuit Playground[7]
 
Gift Certificates[4]