Part Number: TM4C123GH6ZRB
Hello,
I am working with the TM4C123GH6ZRB and am trying to implement a composite device that consists of a BULK interface 0, and a MSC interface 1. Both interfaces work great on their own when they are not in a composite device, but once I try to put them together, I see an extreme drop in the MSC transfer speeds. For instance, when I am running just the MSC device, I can get ~64KBps. However, once it switches to the composite device, that same interface struggles to get ~8KBps.
I am using the TI TIVA MSC library and MSC example (usblib\device\usbdmsc.c & usb_de_msc), combined with a SPI Flash part using the spi_flash driver (utils\spi_flash.h) from TI as well. The spi_flash driver interfaces with a slightly modified version of the example driver MX66I51235f, as I am trying to use the MX25L51245G.
I am initializing my composite device as: //Force USB Device mode with no VBUS/ID monitoring.
USBStackModeSet(0, eUSBModeForceDevice, 0);
//Initialize our custom BULK interface
g_sCompDevice.psDevices[0].pvInstance = USBDBulkCompositeInit(0, &g_sBulkDevice, &g_psCompEntries[0]);
//Initialize a generic MSC interface
g_sCompDevice.psDevices[1].pvInstance = USBDMSCCompositeInit(0, &g_sMSCDevice, &g_psCompEntries[1]);
//Initialize USB device as a COMP device with BULK and MSC interfaces defined above
USBDCompositeInit(0, &g_sCompDevice, COMPOSITE_DBULK_SIZE + COMPOSITE_DMSC_SIZE, (uint8_t *)pucDesciptorData);
Is there a reason that both of these interfaces work fine by themselves (Just calling USBDBulkInit or USBDMSCInit), but once I try to put them in the composite configuration I loose a lot of the throughput on the MSC interface? Is there some kind of configuration that I might be missing, or a method I should be using to better handle the MSC transfers?