Re: Simple iso code isn't sending any data at all (not even a request)?

Xiaofan Chen <[email protected]> Wed, 10 Jun 2015 13:34:10 +0800
Newsgroups gmane.comp.lib.libusb.devel.windows
Message-ID <CAGjSPUCrEY+_bxAJ7rStB9r9_O4Tnzzx5c7izjTyayizkQ6GQg@mail.gmail.com>
On Wed, Jun 10, 2015 at 8:02 AM, Chris E <[email protected]> wrote:
> That would only work for oscilloscopes with an external display or
> triggering, wouldn't it?
> To view and log waveforms in real time you'd need to stream data.
> Bulk could be used with some sort of handshaking attached, but samples would
> be lost if the host doesn't request packets regularly.
> The microcontroller I'm using has only 2kB of RAM (only about 1kB of which I
> can reserve for the USB buffers) and I plan on sending 500kB/s per second to
> the host, so if a new 500 byte packet isn't sent each frame then everything
> will get corrupted.
>
> Unless Bulk transfer can more or less "guarantee" a packet every ms on a
> not-so-busy bus?

Actually there will be multiple packets if you use Bulk transfer
on a not-so-busy bus. For full speed USB Bulk transfer, the
limit is 19packets x 64Bytes/packet per ms (1 frame)=1216Bytes/ms.
Usually you will not be able to achieve 19 but I have seen 16
(1024Bytes/ms).

Ref: http://www.microchip.com/forums/m417509.aspx

Maybe you wan to read the USBTMC standard to see if that is
what you need. No isoc transfer is used.
http://www.usb.org/developers/docs/devclass_docs/USBTMC_1_006a.zip

Or some introduction.
http://www.ni.com/tutorial/4478/en/ (either USBTMC or USB raw, but no
isoc transfer support for USB raw).
http://sigrok.org/wiki/USBTMC

In a word, you do not need to use isoc transfer for your
USB oscilloscopes. But whether you can support 500kB/s
to the host depends your implementation, it is certainly
within the theoretical limit with USB Full Speed using bulk
transfer.


-- 
Xiaofan

------------------------------------------------------------------------------