Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Missing data packets when connecting AT89C51 with other device via USB

Status
Not open for further replies.

ashugtiwari

Full Member level 4
Joined
Dec 12, 2008
Messages
218
Helped
45
Reputation
90
Reaction score
44
Trophy points
1,308
Activity points
3,310
Hi all,
I am using at89c51 uC to comuunicate to PC through USB in isochronous mode. If i connect to same USB host controller my device and any other device (i connected web cam works in bulk mode), the USB packets are grtting missed. Is this problem is regarding bandwidth of USB or something else. Please reply. By the way both device i used works in full speed. Thanks in advance.

Ashutosh
 

usb bulk transfer lost

Hi!
You must provide some more details about that situation...
How exactly your device is missing ? Just missed some packet or is entirely lost from USB bus ?

Are you sure that the USB camera use Bulk ? It's not typical for real video & audio ...
Also if it is Bulk then this MUST NOT disturb your device ! By USB specification Bulk transfers are performed ONLY when there is enough BUS free bindwidth, so you must not receive any video or audio if your Isohronous device sends much data...
However I think camera use Isohronous also... So What is happened we you cannect your device (there is nothing else on the USB bus) ... Host ask your device for required Iso data ... USB spec. 5.6.1 says
"An endpoint in a given configuration for an isochronous pipe specifies the maximum size data payload that it can transmit or receive. The USB System Software uses this information during configuration to ensure that there is sufficient bus time to accommodate this maximum data payload in each (micro)frame. If there is sufficient bus time for the maximum data payload, the configuration is established; if not, the configuration is not established."
So, it'll be ok cause all bandwidth is free now...

Now you connect 2-nd device... If it is Bulk - there must not be problem ... Isohronous take precedence over Bulk and your device will continue to work properly...

If 2-nd device use Iso again - that problem occurs... By specification HOST must discard second device configuration if no enough bandwidth, BUT it's also possible Host to decide to ask devices again for alternative configuration to fit their requirements... and I think that here actually your device lose the bandwidth... You can debug it and check does HOST assing you new configuration ?

Also, it's possible these dropped packets to be lost due to CRC error for example!
How much packets have been lost ?

Regards !

And don't forget helped me button if I helped you
 
bulk payload data

I apolozise for my mistake, The camera works too on isochronous mode. And i am missing nearly 2-3 packets in whole communications. Please let me know if any answer.

Ashutosh
 

serial interface engine

So, host has enought bandwidth for both devices...
Can you detect (via breakpoint) is the reason is due to CRC errors ? I doubt cause it must be in SIE engine ... However... For Isochronous transfer it is normal to skip some packets due to crc errors... What is your application ? Why you don't use BULK or Interrupt - they are dedicated for such applications where the data are re-transmitted in case of errors ? One is 100% sure - using Iso transfer there will be always missed packets and your sw must not block on it... I remember in one an audio device we made that was a typical situation to miss a packet...
I'm sure that you missed packets also if there isn't any oter device ... Can you test it ?
If no, then the reason may be in USB HOST , usb driver or PC ...
Have you tied that test in different PC ?
 
iso transfer real time application in usb

Thanks for reply,
Well I am not much aware about the CRC, but when i connect anly my device to one host controller then it works completely fine without any single loss of packet and even with any printer/pen drive/mouse connected it never loses data. I am working on medical applications in which the application needs continuous real time data to be provided to the doctor. I had already tested with bulk transfer it loses more data than expected. In laptop I got single packet missing when no device was connected, while there is no loss in destop PC if no other device connected. Can you please tell what SIE engine exactly? Plz do reply.

Ashutosh
 

usb missing audio packets

Hi again SIE - that is Serial Interface Engine ... This is the part of any USB device that handle encoding/decoding including CRC generation and checking... It's Build-in Hardware module within USB function for any microcontroller...
But one thing disturb me... If you use Bulk there mustn't be a loss packet !!!
The different behave of the device on Laptop and PC shows exactly that this not a problem of your device but it's Host related situation...
Please, send me PM with your skype or ICQ so we can continue our conversation in details there !
Regards!
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top