I've been looking at the Host OTG USB Drivers, as our application will need to communicate with a 3G/4G modem all nearly all devices currently are USB based.
I'm very new to USB Device drivers and we just using the USB Mass Storage driver ( our software alreay integrates the FSS ), and I've been looking at the device enumeration aspects using the Debugger.
I noticed that when I plugged in a USB RS232 Converter ( this particular one is and FTTI chip ) the enumerated Device Descriptor was corrupted.
After alot of debugging I've tracked the issue down to the EnumDeviceStateMachine function in adi_usb_otg.c file.
case DEP_GET_DEV_DESCRIPTOR_1: is the line
but for this particular device the descriptor is delivered in a 16 byte transaction then a 2 byte transaction, thus the buffer being coppied into the pDeviceDesc only has the last 2 bytes resulting in a corrupted device descriptor.
I've modifed the line to read
and that from my testing now results in a complete device descriptor being give back to the upper level.
If this is not the place to report bugs please let me know.
If there is any more information that migh help me write a usd host mode driver please let me know as there appear to be very little documentation on host mode.
VisualDSP++ V5.0 Update 10
VDK based project
Depending on the maximum endpoint size there could be multiple transactions in a transfer. It appears like your device is a full speed device with maximum ep0 size of 16 bytes. confirm. Also are you getting any errors? The driver should not return the buffer until the entire transfer is complete. Is it returning the buffer partially? Also are you enabling data cache? If so does the behavior change if data cache is disabled?