Author Topic: Speed of the LVR Bulk transfer solution  (Read 17003 times)

bebetxx

  • Member
  • ***
  • Posts: 11
Speed of the LVR Bulk transfer solution
« on: October 28, 2013, 04:05:40 am »
Good day folks,

What's the maximum utility bits speed transfer of the LVR Bulk transmission solution presented by Jan Axelson. What about using a PIC32 instead of a PIC18? I know that the PIC USB it's a high speed transmission that enables maximum 12 m bitis/s. Thank you for reading my topic.
« Last Edit: October 28, 2013, 04:08:54 am by bebetxx »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Speed of the LVR Bulk transfer solution
« Reply #1 on: October 28, 2013, 10:02:59 am »
Bulk transfers are the fastest transfer type on an otherwise idle bus.

USB full speed theoretical max transfer rate is 1.216 MBytes/sec.

For USB high speed, it's 53.248 MBytes/sec.

SuperSpeed, 400 MBytes/sec.

Actual performance depends on the efficiency of the host driver and application software, the efficiency of the device firmware, the transfer size (one long transfer will be quicker than many short transfers), endpoint size (use the maximum allowed), and how busy the bus is.

I believe Microchip's device controllers are all full speed or low speed:

http://www.microchip.com/pagehandler/en-us/technology/usb

bebetxx

  • Member
  • ***
  • Posts: 11
Re: Speed of the LVR Bulk transfer solution
« Reply #2 on: November 02, 2013, 04:44:41 am »
In my tests I am able to send only 1.8 m bits/s with the LVR bulk transfer, why is so bad at transmitting data? What should I do if I want to have 5 m bits/s?

Also I tested the LVR bulk communication with USBlyzer and sniffed the data transmitted from my PIC18F4550 and the software in C++ and I saw that the software sends two times the same information and receive 2 times the same information why? Also there are some bulk packets transmitted each time with no raw data why? You can see in the following image.

« Last Edit: November 02, 2013, 06:58:57 am by bebetxx »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Speed of the LVR Bulk transfer solution
« Reply #3 on: November 02, 2013, 01:30:00 pm »
A software analyzer can only show data at the driver level. A hardware protocol analyzer can show what is happening on the bus. If the device is NAKing any IN token packets, that means the device is slowing things down. If you don't have a hardware analyzer, use whatever device debugging tools you have to find out if the device is NAKing.

The URB pairs with identical data show different driver names, one usbhub and one ACPI (device configuration and power management). I don't know the purpose of the URBs with no data (completion?) but I doubt that these are the source of the delays.

If your application is sending data in 64-byte blocks, that will be slower than requesting a single, larger transfer.
« Last Edit: November 02, 2013, 03:43:59 pm by Jan Axelson »

bebetxx

  • Member
  • ***
  • Posts: 11
Re: Speed of the LVR Bulk transfer solution
« Reply #4 on: November 02, 2013, 04:08:50 pm »
If your application is sending data in 64-byte blocks, that will be slower than requesting a single, larger transfer.

I just used the software example provided by you and I made a for loop to send 1000 times a 64 byte data. Where should I change the code and how to send a large transfer?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Speed of the LVR Bulk transfer solution
« Reply #5 on: November 02, 2013, 06:06:27 pm »
Increase the buffer size and amount of data to send for WinUsb_WritePipe.

bebetxx

  • Member
  • ***
  • Posts: 11
Re: Speed of the LVR Bulk transfer solution
« Reply #6 on: November 03, 2013, 02:32:57 am »
Increase the buffer size and amount of data to send for WinUsb_WritePipe.

Can I use the WinUSB_ReadPipe to send the data from the device(PIC) to the host(Windows software)? I am interested to send about 4-5 m bits/s.
Is there any example of how to use the WinSB_ReadPipe, and how to program the firmware for using ReadPipe to send big data(from device to host) like mine with the WinUSB High Bandwidth example?
« Last Edit: November 03, 2013, 04:06:45 am by bebetxx »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Speed of the LVR Bulk transfer solution
« Reply #7 on: November 03, 2013, 10:31:51 am »