I am using StarterWare_1_00_03_03 with an AM1808. I am using the usb_dev_bulk example to echo data. I modified the usbhandler.c file to add a bit toggle when I enter the USB0DeviceIntHandler() function. Below is the code if you want to see it. I am watching the toggle on a scope and sometimes the handler is taking 100s of milliseconds to complete. Does anyone know why it would take that long to complete the handler? If I understand the architecture correctly, this handler is called from the USB ISR.
void
USB0DeviceIntHandler(void)
{
unsigned int ulStatus = 0;
unsigned int epStatus = 0;
paddr = (int*)(0x660000F4);
*paddr |= 0x04;
#if defined(am335x) || defined(c6a811x) || defined(am386x) || \
defined(c6741x)
//
// Get the controller interrupt status.
//
ulStatus = HWREG(USB_0_OTGBASE + USB_0_IRQ_STATUS_1);
//
// Get the EP interrupt status.
//
epStatus = HWREG(USB_0_OTGBASE + USB_0_IRQ_STATUS_0);
//
// Clear the controller interrupt status.
//
HWREG(USB_0_OTGBASE + USB_0_IRQ_STATUS_1) = ulStatus;
//
// Clear the EP interrupt status.
//
HWREG(USB_0_OTGBASE + USB_0_IRQ_STATUS_0) = epStatus;
#ifdef DMA_MODE
HWREG(USBSS_BASE + USBSS_IRQ_STATUS) =
HWREG(USBSS_BASE + USBSS_IRQ_STATUS);
#endif
//
//Call the Interrupt Handler.
//
USBDeviceIntHandlerInternal(0, ulStatus, &epStatus);
//
//End of Interrupts.
//
HWREG(USB_0_OTGBASE + USB_0_IRQ_EOI) = 0;
#ifdef DMA_MODE
HWREG(USBSS_BASE + USBSS_IRQ_EOI) = 0;
#endif
#else
//
// Get the controller interrupt status.
//
ulStatus = HWREG(USB_0_OTGBASE + USB_0_INTR_SRC);
epStatus = 0;
// Clear the Interrupts
HWREG(USB_0_OTGBASE + USB_0_INTR_SRC_CLEAR) = ulStatus;
#ifdef _TMS320C6X
IntEventClear(SYS_INT_USB0);
#else
IntSystemStatusClear(SYS_INT_USB0);
#endif
//
// Call the internal handler.
//
USBDeviceIntHandlerInternal(0, ulStatus, NULL);
// End of Interrupts
HWREG(USB_0_OTGBASE + USB_0_END_OF_INTR) = 0;
#endif
*paddr &= ~0x04;
}