On 11/30/2011 10:56 AM, Ekkehard wrote:
> I am working with an existing device, coming up with the given descriptor.
> Since it does'nt worked, I made a firmware for my Cypress board to emulate
> the behavior, e.g. coming up with an compareable descriptor, sending data in
> the same size and matter etc.
> Having now two devices behaving same, I am pretty sure that there is
> something strange - or not understood by me.
> As described above in the thread I was able to catch the transmitted data
> with Snoopy Pro, which shows the up and down going URBs and there related
> content.
> Definitly I can say that a buffer size of 940 bytes passed to the related
> functions, will cause errors in the received data, more precisely in the
> URBs shown in Snoopy Pro. The errors occours often on the same memory
> positions, but I was not able to determine the prinicple of occourence.
> Using 1024 instead (a kind of ignoring the descriptor) works perfect.
> There
> are no transmission errors, holes, overwritten or missed data, etc.
I think this says it all. Your device *must* be sending 1024b packets
to the PC, otherwise there would be sections of unused data, of size
1024-940=84 bytes, at the end of each packet.
> I left
> the program run for hours free of errors.
> Anyway, since it works, your software does the job!!
>
I certainly can't argue with success. ;) Your solution fixed it.
However, this device violates USB specs when it (presumably) sends
packets larger than it's reported wMaxPacketSize. This might cause
problems with different host controllers, OSes, etc.
Regards,
Travis
|