Workaround for Windows problem with 64-byte packets
Status: Beta
Brought to you by:
bertrik
Bruce Paterson alerted me on the LPC2000 mailing list about an issue between the virtual COM port example and the windows usbser.sys driver. Apparently windows does not appear to handle a packet of 64 incoming bytes directly; it is delayed until the next data transfer from device to host. This appears to be a bug in the usbser.sys driver.
The proposed workaround is to avoid sending 64-byte packets to the host by limiting the size of packets to 63 bytes.
Logged In: YES
user_id=282107
Originator: YES
Tsuneo Chinzei suggests the following alternative:
>> Bertrik, if you change your LPCUSB code to simply limit the max
>> amount sent per packet to MAX_PACKET_SIZE-1 you can nicely sidestep the
>> 64byte issue with no ill effects.
>
> This is not good implementation, because it reduces the transfer speed
> significantly.
> Send ZLP to the bulk-IN EP just when,
> a) The last packet was full-size (64bytes) packet
> b) No data for transfer for 1msec since the last packet