Hi,
Our system uses the Am335x which have 2 OTG ports and run with WEC 7 using the TI-Adeneo release BSP. In our set-up one OTG port is permanently used as Host and the other is a permanent device port. We just moved to this new platform so we are still trying to fine tune everything to make sure we are keeping backward compatibility with our legacy applications.
One issue we observed is that one of our legacy application assumes that the USBFN Class driver is always loaded at boot-up. However, in this new platform, the USBFN class driver is only loaded after a "Device-Attach" event is received. And then once there the device is detached, it will also unload the Class Driver.
Questions:
1.) Since our system only implement a single type of peripheral mode, is there a way that we can load the class driver for the USBFN right from boot-up like built-in drivers without waiting for a "Device-Attach" event?
2.) Is there a way that we can also prevent the class driver to be unloaded during a USB "Detach" event? This is because our legacy application, only gets the driver handle on it's initialization and from there on, it will only keep polling the same handle for any data received. Right now, when the driver gets unloaded after a detach, the handle will turn invalid and application will be left with an invalid handle.
As a background, in our old system the class driver was set to disguise as a COM port to the application, so the loading only happens at boot-up and it nevers gets unloaded. Now, we see this as a performance bottleneck as more data gets passed with newer use cases. So we moved to implementing it as a real USBFN class driver, actually a printer class driver.