I wrote a little fw which indicates whether the host should read data by setting it's interrupt1-in-flag. When I call the usbSetInterrupt-method by eg
Code: Select all
usbSetInterrupt(&LED_PORT, 1);
Code: Select all
usbSetInterrupt(0, 0);
Code: Select all
usb_interrupt_read(handle, USB.REQ_TYPE_DIR_DEVICE_TO_HOST | 1, buffer, buffer.length, 24*60*60*1000);
Code: Select all
usb_control_msg(handle, USB.REQ_TYPE_DIR_DEVICE_TO_HOST | USB.REQ_TYPE_TYPE_VENDOR | USB.REQ_TYPE_RECIP_DEVICE, 1, 0, 0, buffer, buffer.length, 5000);
Code: Select all
error sending control message: Protocol error
AVR-source and accessing Java-source attached.
Regards,
Chris
/Edit:
To clarify two things ... When I use
Code: Select all
usbSetInterrupt(0, 0);
AVR-USB hanging does not mean that the whole uC hangs ... It's just AVR-USB not responding to requests.