Having a difficult time getting iso transfers working. What am I missing now?

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by HenryPhillis on Tue Oct 02 21:36:16 MST 2012
Evening folks. I'm trying to to get isochronous (OUT) transfers working and have run into nothing but troubles sofar! Does anyone have an example?.. or a working usb stack? The keil one has some bugs that make me think either nobody reviewed it or it was written by a novice ... such as this in usbhw.c:

void delay (uint32_t length ) {
  uint32_t i;

  for ( i = 0; i < length; i++ ) {
My code wouldn't enumerate after I added optimization flags.. it took me a while to track down this because I thought it was an issue with something I did... not of Keil's code. :mad:

This is the fix by the way (put it in the for loop):
    __asm volatile("nop");

On the host side, I've made a libusb app that talks with EP4 (OUT) on the LPC1343.. This connects fine and via my usb logic analyzer, I can verify data really is being sent to the device.

On the device side, I have:
1. Added an interface with ONE endpoint... an OUT endpoint going to EP 4 since this is the only EP that supports 512 iso transfers.
2. Added a USB_EndPoint4 function in usbuser.c and some code that toggles an led on and off. 
3. in usbcfg.h, changed the following so USB_EndPoint4 would be called (it took me a while to understand this)

#define USB_EP_EVENT 0x11
What else do I need to do to get my method called when an iso transfer comes in? The led does not toggle as is and I can't find much more information.

Any additional info would be really helpful! My angst might be coming out in this post, but it's only because I've spent many hours trying to figure out what's going on.

Edit: It's probably worth mentioning I'm using 1.2 of the keil arm usb stack.