SEARCH
TOOLBOX
LANGUAGES
Register    Login    Forum    Search    FAQ

Board index » Electronics Projects » AVR microcontroller projects




Post new topic Reply to topic  [ 13 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Generic AVR framework to move 24-32 megabits?
 Post Posted: Wed May 23, 2012 8:33 pm 
Offline

Joined: Thu Apr 01, 2010 6:23 am
Posts: 893
The timeout is occuring because the device gets the wrong information from the host during the transfer and stops the operation, since the device doesn't reply (because the command was stopped) the USB operation on the host times out. The device isn't really 'detached' from the USB, but the library considers it to be so you have to unplug and replug the device to get everything back into a known state. That was why I designed it like that; so it has a clear 'stop' point if anything goes wrong.

The fact that turning off the debug makes it work is interesting... Presumably the debug increases the load and makes the operations slower; but it shouldn't make it so that it is any where near as long as 3 seconds.

There is a possiblity that the flood of debug requests backing up whilst the bulk transfer is performed is enough make the next command fail (a buffer overflowing somewhere perhaps), but I have never seen this occur when testing. The library uses a blocking read and write call, so it shouldn't be returning unless the lower-level windows functions have completed.

Out of curiousity how modern is your PC? Perhaps a slower PC would reproduce the issue. If you have a low spec PC it might be worth trying the tests on another box.

It's a shame you don't have a ready-made board so we could know for sure that the software is at fault.

I have to admit I'm running low on ideas... without something I can reproduce it's hard to think of what to do to track the issue :(

On a side note I'm starting to believe that the debug mechanism was not a great idea anyway; it would have been better to make the device enumerate as both a USB HID and a CDC (serial port) and run the debug over the CDC since then the debug could be collected without the need to constantly poll the device (I could also make including the CDC optional when compiling the device firmware). Perhaps over the summer (when I have some time away from 'real' work) I will implement it :)


Top 
 Profile  
 
 Post subject: Re: Generic AVR framework to move 24-32 megabits?
 Post Posted: Wed May 23, 2012 10:22 pm 
Offline

Joined: Mon May 07, 2012 11:40 pm
Posts: 7
Simon Inns wrote:
Out of curiousity how modern is your PC? Perhaps a slower PC would reproduce the issue. If you have a low spec PC it might be worth trying the tests on another box.

I've been testing at work a Win7 64bit machine. Intel Core i7. The one I test with at home is similar, but slightly slower AMD processor. Still Win7 64bit.

Quote:
It's a shame you don't have a ready-made board so we could know for sure that the software is at fault.

Agreed - just ordered a Teensy for more experimentation/confirmation. I really would like to find out if my self-designed hardware has any issues - that way I can fix them for Rev 2 :lol:

Quote:
On a side note I'm starting to believe that the debug mechanism was not a great idea anyway; it would have been better to make the device enumerate as both a USB HID and a CDC (serial port) and run the debug over the CDC since then the debug could be collected without the need to constantly poll the device (I could also make including the CDC optional when compiling the device firmware). Perhaps over the summer (when I have some time away from 'real' work) I will implement it :)

That sounds like a brilliant idea!

Thanks again for your help on this issue. I don't want to be more of a bother than I have already been so I'll leave the issue be for now. After messing with the timeout stuff, and getting Test 4 to work nearly of the time, I am feeling confident I can give another shot at programming my flash chip. Just for sake of 'thread completeness', I'll post an update when my Teensy arrives.
Thanks!


Top 
 Profile  
 
 Post subject: Re: Generic AVR framework to move 24-32 megabits?
 Post Posted: Thu May 24, 2012 5:45 am 
Offline

Joined: Thu Apr 01, 2010 6:23 am
Posts: 893
Sounds like a plan; I have a few dev boards here including 2 teensy boards. If you can reproduce your issue on a teensy then I will take a copy of your hex and see if I can get the same result.

Reproducing the issue is the key to tracking down the problem, so let me know the result (positive or negative)!

/Simon


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 13 posts ]  Go to page Previous  1, 2

Board index » Electronics Projects » AVR microcontroller projects


Who is online

Users browsing this forum: No registered users and 0 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Translated by Maël Soucaze © 2009 phpBB.fr