Page 1 of 1

transfering more interrupt in data

Posted: Mon Sep 30, 2013 10:10 am
by Madara
I need to transfer 64 bytes of Interrupt In transfer to PC via AVR. The function usbSetInterrupt is able to transfer only 8 bytes at a time.Using it 8 times to transfer 64 bytes does not seem to be a solution. There is a line in usbdrv.h "If you need to transfer more bytes, use a control read after the interrupt." in the description of usbSetInterrupt.

What is control read and how to transfer more interrupt in data using this method??

Re: transfering more interrupt in data

Posted: Mon Sep 30, 2013 12:48 pm
by matrixstorm
Hi Madara.

VUSB only implements low-speed USB. In low-speed USB the standard forces:

[...]
The maximum data payload size for low-speed devices is 8 bytes.
[...] (from: http://www.beyondlogic.org/usbnutshell/ ... #Interrupt)

So, you can not implent sth. the standard does not allow.

BR matrixstorm

Re: transfering more interrupt in data

Posted: Tue Oct 01, 2013 7:05 am
by Madara
The maximum data payload size is 8 bytes for Control transfers as well.However we are able to transfer upto 254 bytes in VUSB by transferring them in a chuncks of 8 bytes in single control requests. I was wondering if this could be done for interrupt tranfers as there is a little description as "If you need to transfer more bytes, use a control read after the interrupt." in the description of usbSetInterrupt.

Re: transfering more interrupt in data

Posted: Tue Oct 01, 2013 1:45 pm
by ulao
You can not transfer that much data in one go but of course you can do it by chunks in interrupt transfers.


while (!usbInterruptIsReady()){usbPoll(); } usbSetInterrupt( reportBuffer, 8 );
while (!usbInterruptIsReady()){usbPoll(); } usbSetInterrupt((void *)&reportBuffer + 8, 8 );
while (!usbInterruptIsReady()){usbPoll(); } usbSetInterrupt((void *)&reportBuffer + 16, 8 );
ect...