Atmega32u4 Breakout Board Leonardo Driver Issues

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Daanii
 
Posts: 15
Joined: Thu Jan 21, 2010 12:58 am

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by Daanii »

adafruit wrote:we'll have an update to this product shortly.
This is a nice little product. If you can fix the problem, and if you get these back in stock, I'll be in line to buy a few. A Teensy is close to this, but as you point out on your website, this product is better.

Good luck fixing this troublesome bug. I hope that toddkrein's find turns out to be the solution.

User avatar
toddkrein
 
Posts: 34
Joined: Wed May 05, 2010 3:17 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by toddkrein »

Has anyone else been able to verify (one way or the other) the "fixed" bootloader?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by adafruit »

hi todd,

there is not a "fixed" bootloader yet - we have one that we have worked on that is working on all the systems we have tested now but we are working with the arduino team to see if there are any issues before we do some more testing.

thanks,
adafruit

User avatar
toddkrein
 
Posts: 34
Joined: Wed May 05, 2010 3:17 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by toddkrein »

OK, let me rephrase it: Has anyone been able to test the bootloader that I posted with the fix for the Error 10 problem?

marcalexander
 
Posts: 1
Joined: Mon Jan 09, 2012 11:06 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by marcalexander »

Hey Todd,

I've been testing it, thanks!

I see the place to fix it in the 1.0 (beta) USBCore.cpp, at least I think that's it:
" if ((u8)setup.wLength < desc_length) // bit of a cheat limiting to 255 bytes TODO (saved 8 bytes)
desc_length = (u8)setup.wLength; "

Backing up a bit, I've spent the holidays and last few weeks on and off in testing and design of a 32U4 breakout board which is a special giveaway for 600 happy attendees next week at the big open source developers conference here, linux.conf.au 2012

So I've tried the beta 1.0 bootloader on both the Adafruit 32U4 breakout board, and our one which is just a little smaller but plugs straight into the PC USB port like a memory stick.
Since they're pretty much a 32U4 MCU and not much else they all work the same as each other so far!

So far I've tried ubuntu 11.04, OSX 10.5 Leopard, Windows XP, Windows 7 32 bit and two Windows 7 64 bit machines (one no service pack, one SP1). All seemed fine except for Windows 7 64 bit.
Ubuntu 11.04 had a couple of kernel panics on insertion early on but they disappeared and haven't come back, not sure what that was.
The main issue is the driver/bootloader combination seems to blow up on Windows 7 64 bit, and I assume on other 64 bit OS's.
On my Windows 7 64 bit PC, it really predictably throws a blue screen of death (BSOD) of BAD_POOL_CALLER either at the end of the first driver installation process, or after that, if the board is simply plugged in.

I've done sooo many hours of troubleshooting so far, and inspected the device loading and enumeration logs, (setupapi.dev.log) and compared it to other successful installs of other boards, tweaked files, rolled back registry entries, and it seems to be either something to do with the song-and-dance that the bootloader does first, then sketch separately does seconds after with its USB enumeration and feature declarations, or maybe some issue with the new MI_00 multi-instance option at the end of the definition. Or a couple of other candidates I've written more notes on at home.
I must setup a test PC so I'm not doing this to my main computer ;)

Now this is weird:
The "255+" fixed bootloader that you made actually makes my Win7 64 bit PC's BSOD more.
Whereas the original 'beta' bootloader from 1.0 can go maybe 10-20 inserts before it triggers the crash.
Maybe it's because the other error is gone, I'm going to go back and test some more on Windows 7 32 bit for you specifically about the Error 10 (device cannot start) comparison.

Also, the board is much less likely to BSOD Windows if the board has a sketch loaded on it.
If it's never had a sketch loaded on it, the bootloader is the only thing in the flash and the only item to enumerate and maintain the USB COM port connection in Windows. For some reason the bootloader by itself like this is much more likely to trigger the BSOD crash.
* Note, the bootloader and sketch handle USB separately, they both have separate handlers built into their application.
If there is a sketch loaded, the bootloader jumps to the sketch pretty fast, and the driver enumeration from there for that seems to go much smoother.
In fact what happens in Windows is if the board has *always* had a sketch loaded first; you never get a chance to load the driver (.inf file) for the bootloader side as it disappears fast. However the sketch is then handling USB after seems to work out to be a bit more stable at the moment.
This type of crash is supposedly a low level hardware/driver issue, so I reckon they're already on top of this.

So we are deliberately giving away these boards for linux.conf.au with a sketch loaded, so with any luck the beta/bootloader side of USB handling shouldn't be as much of an issue at the moment.

Still to chase down is clearing out my PC's remembered COM port attachments, I'm a bit sus on those as there was an earlier time where for the first 30-40 inserts into my laptop with the beta 1.0 bootloader went fine.

Anyway hope this helps out!

I'm going to see who to get in touch with and support more testing too, I'm up to my ears in PC's and 32U4 boards at the moment so it's a good time :)

Cheers,
Marc

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by adafruit »

some updates, not exactly - but here it goes.

we don't expect to release any "fixed bootloader" any time soon - for our kits we're going to continue to use our own bootloader that works and have been tested. the leonardo bootloader that was in the arduino release isn't likely going to be used or supported (this is why we said should be considered beta). we did spend a lot of time and we do have a "fixed" one. but - we're pretty sure this will not be what is released. we've handed off our fixed bootloader to the arduino team, if and when there are any updates on what they plan to do, we'll let you.

for now, our suggestion is that no one should use what's floating around out there - @marcalexander, 600 boards, wow! that's scary :(

the few customers that got a beta-bootloader or the few kits that had a incorrectly burned chip witht he 32u4/LED belt kits we're swapping them out and taking care of them directly and since there are only a few people it's 99% taken care of.

thanks,
adafruit

Daanii
 
Posts: 15
Joined: Thu Jan 21, 2010 12:58 am

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by Daanii »

Too bad about this nagging issue with the bootloader. The Atmega32u4 breakout board is a nice product, and I would have liked to use it.

But I had to go with Teensies instead. Adrastos, thanks for the recommendation to do so:
Adrastos wrote:@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.
The Teensy does exactly what I need it to do. So I got five of them, and am wiring them up. The main problem is that they are too teensy for my application, where size is not an issue and the tiny button on the Teensy is a bit of a bother and the lack of mounting holes a problem as well.

bigmessowires
 
Posts: 69
Joined: Sun Jun 05, 2011 7:34 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by bigmessowires »

adafruit wrote:for our kits we're going to continue to use our own bootloader that works and have been tested. the leonardo bootloader that was in the arduino release isn't likely going to be used or supported (this is why we said should be considered beta).
Does "continue to use our own bootloader" mean going back to the old AVR109 bootloader, and dropping the leonardo bootloader? Or reverting to some earlier version of the leonardo bootloader?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by adafruit »

bigmessowires wrote:Does "continue to use our own bootloader" mean going back to the old AVR109 bootloader, and dropping the leonardo bootloader? Or reverting to some earlier version of the leonardo bootloader?
for now our own that we know works great :)

cheers,
adafruit

bigmessowires
 
Posts: 69
Joined: Sun Jun 05, 2011 7:34 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by bigmessowires »

Sorry, I'm still not sure which bootloader "our own" means. Is this a new bootloader that you've developed (the "fixed" one you mentioned), or something else? Where can we download this bootloader?

Thanks!

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by adafruit »

our own as in the original that came with the 32u4 board we made and the LED belt kit. we tried to use the leonardo (beta) and that had too many issues, we fixed the leonardo bootloader and while the version we fixed works, we've only sent it along to the arduino team.

the orignal adafruit bootloader info is all here:
http://ladyada.net/products/atmega32u4b ... /#download

thanks!
adafruit

User avatar
toddkrein
 
Posts: 34
Joined: Wed May 05, 2010 3:17 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by toddkrein »

I went to the page reference above, but I cannot find the bootloader .hex file. I can find a link to the sources on GitHub, but I don't want to have to build it from scratch. Am I missing something here? Can someone just post the boot loader so I can update the 15 dead boards I have on my desk?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by adafruit »

hi todd,

thanks for the note, we're adding/moving things around at the moment. we made sure there's a complied hex.

https://github.com/adafruit/lufa-lib/tr ... oaders/CDC
https://github.com/adafruit/lufa-lib/bl ... derCDC.hex
https://github.com/adafruit/lufa-lib/bl ... C/makefile

thanks!
adafruit

User avatar
toddkrein
 
Posts: 34
Joined: Wed May 05, 2010 3:17 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by toddkrein »

Two quick notes:

1) For folks that find GitHub as confusing as I do, you can download individual files by right-clicking on the word "raw" on the righthand side of the page.
2) If you had the leonardo bootloader, don't forget to change the fuses to 2K words for the LUFA bootloader.

User avatar
woozer
 
Posts: 14
Joined: Thu Apr 12, 2012 12:35 pm

Re: Atmega32u4 Breakout Board Leonardo Driver Issues

Post by woozer »

toddkrein wrote:You are in a maze of twisty bootloaders, all alike...

I spent some time going through the code. If the boot loader senses that a sketch has been loaded (because the reset vector is no longer 0xFFFF), then it jumps to that after ~3 seconds. The bootloader itself enumerates (or tries to) as a com port. With some magic incatations, it actually succeds.

The Arduino code for Leonardo, however, has initialization code that tries to enumerate as a multi-function device, a com port and a human interface device. The USB descriptors for the Sketch COM port is different than that for the bootloader COM port.

I'm wondering if the problem is related to Windoze trying to enumerate the bootstrap COM port at the same time that the bootloader is branching into the Sketch, which is trying to be a multifunction device with a different kind of COM port.

My next step, when I get a chance, is to change the #ifdefs to only define a COM port, or perhaps only an HID, and see if one or the other is causing the BSoD.

OMG this is true,

I have a Vinciduino board using the standard Davinci bootloader and driver file
I fixed my error 10 code and driver issue by doing the following:

- download virtualbox
- install ubuntu on virtualbox
- install arduino 1.0 IDE on ubuntu
- burn a sketch using arduino IDE

now, when i reconnect my board to my windows 7 64bit machine, it all works like a charm...

so, windows7(x64) and perhaps other versions can't install the driver when only the bootloader is burned to the chip, and no sketch......

Hope this helps someone,
W

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”