Hi all, I am using LPC2148 microcontroller. Bulk driver for usb2.0 full speed is written. Currently only 64 bytes of data is written to the endpoint. So the speed achieved is less. I have read in the books that maximum 19 packets of 64 byte length can be transmitted in 1ms frame. How can i increase the speed of bulk transfer.
USBDevIntSt.TxENDPKT is available while the packet is passed to USBTxData register, after USBTxPLen register is set. I'm not sure this bit is still available after SelectEndpoint / Validate commands are issued. Even if this bit would be available, it could be nothing after Validate command.
Rewrite your code as I suggested.
Tsuneo
Hi Tsueno, Now the problem is solved. We where using jungo driver in the host side. With that speed of 32kbytes/s was only achieved.We evaluated the same firmware in the device side with Thesycon host driver. We could achieve a speed of 720kbytes/s.
> We could achieve a speed of 720kbytes/s.
Not enough. You may saturates the bus, if no other device hooks on the bus. 19 full-size packets/frame = 1,216,000 bytes/s
a) How many bytes do you request for read/write call on the host side? In both directions, transfer speed is proportional to the size of single read/write call, until bus bandwidth saturates. Test it at least a couple of 10KBytes. Even MegaBytes will do.
b) On the device side, did you implement double buffer scheme on my first post?
> Thesycon
Surely, Thesycon supplies easy DLL for their driver. But, isn't WinUSB enough?
Hello Tsuneo Can u suggest me some tool to check the USB throughput.?
To evaluate firmware performance, I observe device response on a hardware bus analyzer. When any IN-NAK or OUT-DATA-NAK transaction appears in large data transfer, tuning on the bulk endpoint routine may improve the performance.
Recent quad-core PCs can drive the bus with 19 full-size packets per frame. But on dual-core generation, 18 packets, at most.
How often the host sends IN token to the device in the case of bulk transfer. In interrupt transfer it will be the interval mentioned in the endpoint descriptor. But for bulk its not clear for me. can u help me in this regards.