Wed Aug 14 13:59:43 EDT 2013

Interrupt problem?

I'm running into some weird shit.. So let's see if it's not an
ISR problem.

void USBDCallbacks_Initialized(void)
#if defined(BOARD_USB_UDP)
    // Configure and enable the UDP interrupt
    AIC_ConfigureIT(AT91C_ID_UDP, 0, USBD_InterruptHandler);

#elif defined(BOARD_USB_UDPHS)
    // Configure and enable the UDPHS interrupt
    AIC_ConfigureIT(AT91C_ID_UDPHS, 0, USBD_InterruptHandler);
    #error Unsupported controller.

What about disabling interrupts, and polling the ISR?

Can't do that as the USB read/write routines wait for conditions set
in ISRs..