This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Highspeed USB Interrupt Transfer on SAM3U4E

I'm using interrupt transfers and HID class to transfer data from MCU to PC. For the MCU side I'm modifying the sample hid transfer project in atmel's softpack with Keil uvision and for the PC side I'm using WinDDK.

Essentially I want to increase the transfer speed because the current speed is very slow (< 1 MB/s). I'd like to get the speed up to ~8 MB/s which would require a 1024 B transaction polled every 125 us. I've modified the report and endpoint descriptors which has increased the speed but is still < 1 MB/s. I can't seem to increase the report size further and the driver doesn't appear to be polling at the correct rate.

Below are the report and endpoint descriptors.

Definitions:

/// Interrupt IN endpoint number.
#define HIDDTransferDriverDescriptors_INTERRUPTIN           5
/// Polling rate in ms
#define HIDDTransferDriverDescriptors_INTERRUPTIN_POLLING   0.125
/// Interrupt IN endpoint polling rate (in milliseconds).
#define HIDDTransferDriverDescriptors_INTERRUPTOUT          6
/// Polling rate in ms
#define HIDDTransferDriverDescriptors_INTERRUPTOUT_POLLING  0.125

/// Size of the report descriptor in bytes.
#define HIDDTransferDriverDescriptors_REPORTSIZE        32

/// Size of the input and output report, in bytes
#define HIDDTransferDriver_REPORTSIZE               255

Endpoint Descriptors:

    // Interrupt IN endpoint descriptor
    {
        sizeof(USBEndpointDescriptor),
        USBGenericDescriptor_ENDPOINT,
        USBEndpointDescriptor_ADDRESS(
            USBEndpointDescriptor_IN,
            HIDDTransferDriverDescriptors_INTERRUPTIN),
        USBEndpointDescriptor_INTERRUPT,
        /*MIN(BOARD_USB_ENDPOINTS_MAXPACKETSIZE(
                        HIDDTransferDriverDescriptors_INTERRUPTIN),
            MIN(USBEndpointDescriptor_MAXINTERRUPTSIZE_HS,
                                    HIDDTransferDriver_REPORTSIZE)),*/
                BOARD_USB_ENDPOINTS_MAXPACKETSIZE(HIDDTransferDriverDescriptors_INTERRUPTIN),
        HIDDTransferDriverDescriptors_INTERRUPTIN_POLLING
    },
    // Interrupt OUT endpoint descriptor
    {
        sizeof(USBEndpointDescriptor),
        USBGenericDescriptor_ENDPOINT,
        USBEndpointDescriptor_ADDRESS(
            USBEndpointDescriptor_OUT,
            HIDDTransferDriverDescriptors_INTERRUPTIN),
        USBEndpointDescriptor_INTERRUPT,
        /*MIN(BOARD_USB_ENDPOINTS_MAXPACKETSIZE(
                        HIDDTransferDriverDescriptors_INTERRUPTOUT),
            MIN(USBEndpointDescriptor_MAXINTERRUPTSIZE_HS,
                                    HIDDTransferDriver_REPORTSIZE)),*/
                BOARD_USB_ENDPOINTS_MAXPACKETSIZE(HIDDTransferDriverDescriptors_INTERRUPTOUT),
        HIDDTransferDriverDescriptors_INTERRUPTIN_POLLING
    }

Report Descriptor:

/// Report descriptor used by the driver.
const unsigned char hiddReportDescriptor[] = {

    // Global Usage Page
    HIDReport_GLOBAL_USAGEPAGE + 2, 0xFF, 0xFF, // Vendor-defined
    // Collection: Application
    HIDReport_LOCAL_USAGE + 1, 0xFF, // Vendor-defined
    HIDReport_COLLECTION + 1, HIDReport_COLLECTION_APPLICATION,
        // Input report: Vendor-defined
        HIDReport_LOCAL_USAGE + 1, 0xFF, // Vendor-defined usage
        HIDReport_GLOBAL_REPORTCOUNT + 1, HIDDTransferDriver_REPORTSIZE,
        HIDReport_GLOBAL_REPORTSIZE + 1, 8,
        HIDReport_GLOBAL_LOGICALMINIMUM + 1, (unsigned char) -128,
        HIDReport_GLOBAL_LOGICALMAXIMUM + 1, (unsigned char)  127,
        HIDReport_INPUT + 1, 0,    // No Modifiers

        // Output report: vendor-defined
        HIDReport_LOCAL_USAGE + 1, 0xFF, // Vendor-defined usage
        HIDReport_GLOBAL_REPORTCOUNT + 1, HIDDTransferDriver_REPORTSIZE,
        HIDReport_GLOBAL_REPORTSIZE + 1, 8,
        HIDReport_GLOBAL_LOGICALMINIMUM + 1, (unsigned char) -128,
        HIDReport_GLOBAL_LOGICALMAXIMUM + 1, (unsigned char)  127,
        HIDReport_OUTPUT + 1, 0,    // No Modifiers

    HIDReport_ENDCOLLECTION
};

Any help getting this to work would be appreciated.

0