lpcware

LPC1343 USB Isochronous mode?

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by BrunoF on Thu Aug 26 16:14:27 MST 2010
Hello There.

I own a LPCXPRESSO with a LPC1343 on it. Im trying to get 4mbps from the USB module, but i get stucked when trying to make an isochronous transfer.

First:
There's no example about it. There are examples of both: bulk and interrupt transfer modes(using CDC,MSC and HID classes) but no one about isochronous. :mad:

So, i first tried modifying the HID example in code-red to work with isochronous. Then i tried adding an isochronous endpoint to the original current HID, without removing the HID original endpoint.
First attempt(removing HID endpoint and changing the descriptors to an isochronous one) seems to fail during initialization according to what i can see with SnoopyPro and other sniffer software.
When Host asks for SELECT_CONFIGURATION, it seems that the device didnt return anything, so Host retrys with same result and ignores any further comunication.

Second attempt supposedly initializes ok. One HID IN endpoint(logical 1 address) and one  ISOCHRONOUS IN endpoint(logical 4 address).

The interrupt transfer, associated with HID class works ok, as the original example, but there are no isochronous transfers at all.
So, i know, im really ignoring something in the uC code, and maybe something in the PC side too.

I changed the line:
#define USB_SOF_EVENT       0
in the usbcfg.c HID example file to
#define USB_SOF_EVENT       1
to activate Start Of Frame Event, that should be associated with isochronous transfers. Then i change the USB_SOF_Event() function to send an isochronous packet every 1ms.

uint8_t    DataOut[512];

#if USB_SOF_EVENT
void USB_SOF_Event (void) {
    uint16_t i;
    static uint32_t counter;

    for(i=0;i<512;i++){
        DataOut = i;
    }

    if(USB_Configuration) USB_WriteEP(0x84, &DataOut[0], 512);
}
#endif

But nothing happens. I cant get it. Looking at the code in "usbcore.c" function descriptions seems that only allows logic endpoints in the range of [0 to 3], so, isochronous transfers cant be handled that way?

What im missing? Im writing incorrectly to the isochronous endpoint? How can i activate the isochronous pipe?

P.S. Sorry, my english isnt very fluid.
Thanks for reading...

Outcomes