Ports and Interfaces > USB

bulk transfers

(1/2) > >>

ADB:
Hi Jan,

I'm trying to implement a bulk transfer of 16 MB of data between a microcontroller and a PC. HID cannot do bulk transfers, so I have to use CDC. I've been able to put together a CDC program on my microcontroller which enumerates as CDC, HID and VCOM.

I've been able to do interrupt transfers with your winusb_cs_31 program but not bulk transfers. For this my microcontroller was writing to the HID endpoint. To get a bulk transfer up and going, I take it that my microcontroller needs to write to the CDC endpoint?

Thanks in advance for your advice,

Regards,

Alan

Jan Axelson:
If the device enumerates as a virtual COM Port, access it using the SerialPort class (assuming .NET).

If you want to use WinUSB,  don't use descriptors that define the device (or interface) as a member of a defined USB device class.

The WinUSB and Serial Port pages on my website, janaxelson.com, have more information and example code.

Feel free to post again if you have further questions.
--- Quote from: ADB on June 15, 2018, 08:41:40 am ---Hi Jan,

I'm trying to implement a bulk transfer of 16 MB of data between a microcontroller and a PC. HID cannot do bulk transfers, so I have to use CDC. I've been able to put together a CDC program on my microcontroller which enumerates as CDC, HID and VCOM.

I've been able to do interrupt transfers with your winusb_cs_31 program but not bulk transfers. For this my microcontroller was writing to the HID endpoint. To get a bulk transfer up and going, I take it that my microcontroller needs to write to the CDC endpoint?

Thanks in advance for your advice,

Regards,

Alan

--- End quote ---

ADB:
Hi Jan,

Thank you for getting back to me. What are the advantages of bulk over interrupt transfers? I read somewhere that there is the same amount of error checking in both.

What is the best VCOM of WINUSB for the bulk transfer?

I've attached my USB descriptor C file. If I understand your last post correctly, if I want to use WINUSB for bulk transfer, I need to remove the CIC, DIC and IAD descriptors?

Thanks again,

Alan

Jan Axelson:
Bulk transfers are the fastest on an otherwise idle bus but have no guaranteed timing.

Interrupt transfers have guaranteed maximum latency, or time between transaction attempts.

To access a virtual serial port device, you use the SerialPort class (assuming .NET). To access a WinUSB device, you use the WinUSB API.

The host system uses the descriptors to decide what driver to assign to a device. If the descriptors define the device (or interface) as HID, the host will assign the HID driver. For WinUSB, use Microsoft OS descriptors.

See my Serial Port and WinUSB pages at janaxelson.com for more information.

ADB:
Thanks Jan. I will read up on Microsoft OS descriptors.

Regards,

Alan

Navigation

[0] Message Index

[#] Next page

Go to full version