<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: USB Observations and Questions: Part III (Host System Polling Rates)</title>
		<link>http://forums.leaflabs.com/topic.php?id=692</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:22:02 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=692" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "USB Observations and Questions: Part III (Host System Polling Rates)"</title>
			<link>http://forums.leaflabs.com/topic.php?id=692#post-4044</link>
			<pubDate>Fri, 25 Mar 2011 18:21:32 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">4044@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;StephenFromNYC &#60;/p&#62;
&#60;blockquote&#62;&#60;blockquote&#62;For example, can a single device be configured to use both interrupt transfers (eg for low volume data transfers where data integrity is necessary) and isochronous transfers (eg where a large amount of data needs to be transferred, but the absolute accuracy is not needed)?&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;For example, can a USB device send some periodic low volume ADC measured information (eg. temperature) using interrupt transfer endpoints while it also &#34;simultaneously&#34; streams high volume audio (through isochronous transfers). Imagine yourself listening to music stored on a SD card connected to the Maple while you get the current temperature once every 5 seconds via a ADC temperature sensor.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Yes in theory I believe that is possible, but ...&#60;br /&#62;
... either you need to find an existing host-side device driver which will support this protocol (combination of use of transfers) which I think is unlikely, or you need to write a host-side driver, and figure out how to integrate it into the host-side USB infrastructure.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;Let me try to rephrase the question about assigning multiple COM ports to a single USB device. At the moment, my host system can communicate via USB with the Maple as COM7. However, in the Maple only bulk transfers are currently (March 2011) enabled. Is it theoretically possible (when interrupt transfers are enabled) to use both bulk transfers (COM7) and also interrupt transfers in the same Maple sketch? Will the host see the data arriving from the device as just COM7 or will another virtual COM port be enabled?&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;No.&#60;br /&#62;
The host-side USB CDC driver is constrained to implement the USB CDC standard protocol. I do not believe that protocol has this option. So I don't believe the CDC protocol spec. would use the extra endpoint and transfer type.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;Another way to ask the question is this. The Maple currently (March 2011) use SerialUSB.print() to access bulk transfers.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Yes.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62; If the device can be setup to use for example, both bulk and interrupt transfers&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;I don't believe the USB CDC spec. has this option, so even if the Maple were set up to use the endpoints and transfers the host-side driver won't use them, so nothing would happen.&#60;/p&#62;
&#60;p&#62; what print command will be used to distinguish between the bulk and interrupt transfers?&#60;/p&#62;
&#60;p&#62;It could be any name you would like. There is no 'standard', or constraints on names in Maple code. It won't cause any data to move unless the host-side driver uses the endpoint so I think it is irrelevant.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;If two SD cards are connected to the Maple, can they be configured to appear as two separate hard drives?&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;SD cards can not be configured to be USB devices (in my use of the word configured).&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;Does this require that both host (eg. a host USB driver) and device (eg. libmaple USB drivers) be written?&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Yes, that would do it, then the Maple-side USB driver would determine how the SD cards were presented. AFAIK, the usual USB Flash drive device looks like one volume, but if someone is writing the entire stack, it could look like anything.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;I think we now agree that another way to ask the question is if control transfers occur during each interval?&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;I think we have got to a point where we think there are two units of 'activity', one is the frame, and the other is the systems scheduled response when asked for bInterval.&#60;br /&#62;
Which of these two do you mean when you say 'interval'?&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;I assumed control transfers were used during each interval so the host could tell each of the connected devices when they could send and receive data during that interval. I assumed control transfers acted like traffic cops.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Yes, if we agree it is either a frame or a bInterval, then I think we are assuming a very similar model.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;I think we now agree that devices can set during enumeration when they want to be polled by the host.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Yes!-)&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;Let's assume two devices (deviceA and deviceB) each want to send a full 1023 byte isochronous type data packet every 2 milliseconds.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Okay. So that would be close to an aggregate throughput of one megabyte/second.&#60;br /&#62;
&#38;lt;&#38;gt;My assumption is that during a specific interval the control transfer would be used by the host to tell say which device (A or B) could send its data packet and (by default) which device had to wait.&#38;lt;/&#38;gt;&#60;br /&#62;
I don't assume the control transfer needs to tell a device that it has to wait. Depending on the USB protocol, I assume the host can simply choose not to ask for the data. It doesn't need to say &#34;I am not going to ask for your data&#34;. But I'd need to read all the USB device specs to confirm that is true. &#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;To make the situation more complicated lets assume each isochronous device wants to be polled every millisecond and send a full 1023 packet. What will happen in this situation? Will half of each device's data packets simply not get sent/received?&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;My reading of the definition of isochronous transfers is the USB device requests an amount of bandwidth from the host during enumeration (in this case 1023 bytes/millisecond). The host will reserve that bandwidth, until a further USB device asks for an amount which exceeds the available bandwidth. The host will refuse that request. So it is up to the host to accept requests that it can honour.&#60;br /&#62;
Then the host has several alternatives to deal with the USB devices, which requested bandwidth, and use isochronous transfers, but try to exceed their allocated bandwidth. One is the approach you suggest of not transferring 1/2 of the data for each one, though I think that might have some other implications. I believe it is as valid for the host to starve one.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;Let me quickly return to an old question, which I think we have now answered (over the course of several exchanges). Do we agree that during a single 1 millisecond time interval a device can send a single packet?&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Definitely no.&#60;br /&#62;
Two reasons:&#60;br /&#62;
1. a single device may have more than one endpoint, and hence the device may do one or more transfers in each frame using each endpoint.&#60;br /&#62;
2. I believe that the bulk transfer packet size is a maximum of 64 bytes, but bulk transfer can move much larger chunks of data, and the only way that can happen is for the bulk transfer to support multiple packets.&#60;/p&#62;
&#60;p&#62;I need to go read the spec. to respond to your other questions. I am a bit busy, so I may be slow (or forget).&#60;/p&#62;
&#60;p&#62;Wonderful stuff StephenFromNYC, thank you. I am getting a better understanding of this than I had got from reading it alone.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>StephenFromNYC on "USB Observations and Questions: Part III (Host System Polling Rates)"</title>
			<link>http://forums.leaflabs.com/topic.php?id=692#post-4033</link>
			<pubDate>Fri, 25 Mar 2011 12:33:47 +0000</pubDate>
			<dc:creator>StephenFromNYC</dc:creator>
			<guid isPermaLink="false">4033@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello-&#60;/p&#62;
&#60;p&#62;Let me open this post with a question.  If the current (March 2011) USB implementation of &#60;code&#62;libmaple&#60;/code&#62; uses bulk transfer endpoints (which guarantees data integrity, but not bandwidth access), what is the LeafLabs test to see that this is true?  Would a simple loop of &#60;code&#62;SerialUSB.println(&#38;#39;A&#38;#39;)&#60;/code&#62; which sends a gigabyte of data suffice?  Of course, at the host/receiving end an application would have to test that all the characters received were capital As followed by the CR/newline.&#60;/p&#62;
&#60;p&#62;gbulmer, I think we have unveiled many important questions about USB during our last few exchanges.  We have answered many (of my) basic questions.  Your observations have given me confidence that my growing knowledge is at least heading in the right direction.&#60;/p&#62;
&#60;p&#62;After this post I may sit quietly about USB until I see what changes (eg. DMA) the LeafLabs team has planned for IDE 0.1.0.  I may start a new topic related to how are functions (eg. USB) implemented by st.com on the chip in silicon and how does the libmaple (or software in general) access the hardware functions.  The answers to these questions will determine how much further into USB I can dig.&#60;/p&#62;
&#60;p&#62;However, as I edit this message I realize my understanding of endpoints (which we have not discussed very much) is beginning to solidify.  Maybe I will start another topic on USB endpoints.&#60;/p&#62;
&#60;p&#62;Back to USB transfer types.  In one sentence I phrased a question poorly and also made a mistake (which was caught).  Definitely not one of my best sentences.  Previously, I said (including the mistakes):&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
For example, can a single device be configured to simultaneously use interrupt transfers (eg for low volume data transfers where data integrity is necessary) and bulk transfers (where a large amount of data needs to be transferred, but the absolute accuracy is not needed)?&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Yes, I intended to say isochronous transfers.  Of course, multiple communications cannot be simultaneous over a single wire, so a better way, fixing both mistakes, to phrase the previous sentence is:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
For example, can a single device be configured to use both interrupt transfers (eg for low volume data transfers where data integrity is necessary) and isochronous transfers (eg where a large amount of data needs to be transferred, but the absolute accuracy is not needed)?&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;For example, can a USB device send some periodic low volume ADC measured information (eg. temperature) using interrupt transfer endpoints while it also &#34;simultaneously&#34; streams high volume audio (through isochronous transfers).  Imagine yourself listening to music stored on a SD card connected to the Maple while you get the current temperature once every 5 seconds via a ADC temperature sensor.&#60;/p&#62;
&#60;p&#62;Let me try to rephrase the question about assigning multiple COM ports to a single USB device.  At the moment, my host system can communicate via USB with the Maple as COM7.  However, in the Maple only bulk transfers are currently (March 2011) enabled.  Is it theoretically possible (when interrupt transfers are enabled) to use both bulk transfers (COM7) and also interrupt transfers in the same Maple sketch?  Will the host see the data arriving from the device as just COM7 or will another virtual COM port be enabled?&#60;/p&#62;
&#60;p&#62;Another way to ask the question is this.  The Maple currently (March 2011) use &#60;code&#62;SerialUSB.print()&#60;/code&#62; to access bulk transfers.  If the device can be setup to use for example, both bulk and interrupt transfers what print command will be used to distinguish between the bulk and interrupt transfers?&#60;/p&#62;
&#60;p&#62;If two SD cards are connected to the Maple, can they be configured to appear as two separate hard drives?  Does this require that both host (eg. a host USB driver) and device (eg. libmaple USB drivers) be written?  I am not planning to do this; just trying to think of examples to explain what I originally meant by &#34;simultaneouslt&#34;.&#60;/p&#62;
&#60;p&#62;Is this all wrapped up in endpoints and possibly multiple endpoints?&#60;/p&#62;
&#60;p&#62;Regarding interrupt vs isochronous:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
I'm not sure what you are planning, but CD is sampled at 44,100 Hz, in 16 bits, and stereo doubles that to get 176,000 bytes, quite a lot more than 57,000 bytes.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;I forgot that CD music is 16-bit (2 bytes), so in my mind I was comparing 88K to 57K.  However, 176K is only three times 57K.  I think we can agree that 64,000 bytes/second can be a lot of data (even to a 32-bit cpu), depending on how much it has to be processed before it is sent over the communication line.&#60;/p&#62;
&#60;p&#62;gbulmer says:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
But that is only half the story. There needs to be a host-side driver which will use the transfer. If you're planning on writing your own host-side USB driver, then you can achieve a lot more. But we'd need to do some tests if the plan is to use existing drivers, and the USB spec's define the protocols, and hence which end points and transfer types are used.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;No, I do not plan to write a host-side USB driver, but maybe I set it as a very long term goal if I understand what is meant by &#34;achieve a lot more&#34;.  What else can be achieved using USB 2.0 which is not currently implemented using the current host-side USB drivers?  I assumed the current host-side USB drivers permit the maximum data transfer rates permitted by the USB 2.0 full speed spec.  I assumed that during enumeration, when the device is first connected, as many endpoints are created as are needed/requested by the device.&#60;/p&#62;
&#60;p&#62;Regarding control transfers and time intervals.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
But it doesn't say there *MUST* be control transfers to every device in every frame.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;I think we now agree that another way to ask the question is if control transfers occur during each interval?&#60;/p&#62;
&#60;p&#62;I am still looking for a link which says that control transfer occur during each time interval.&#60;/p&#62;
&#60;p&#62;I assumed control transfers were used during each interval so the host could tell each of the connected devices when they could send and receive data during that interval.  I assumed control transfers acted like traffic cops.&#60;/p&#62;
&#60;p&#62;I think we now agree that devices can set during enumeration when they want to be polled by the host.  Let's assume two devices (deviceA and deviceB) each want to send a full 1023 byte isochronous type data packet every 2 milliseconds.  My assumption is that during a specific interval the control transfer would be used by the host to tell say which device (A or B) could send its data packet and (by default) which device had to wait.&#60;/p&#62;
&#60;p&#62;To make the situation more complicated lets assume each isochronous device wants to be polled every millisecond and send a full 1023 packet.  What will happen in this situation?  Will half of each device's data packets simply not get sent/received?  If deviceA is sending a continuous tone to the left headphone (but silence to the right headphone) and deviceB is sending a continuous tone to the right headphone (but silence to the left headphone) will the host system compromise and jump back and forth between deviceA and deviceB (resulting in sound alternating every millisecond between the left and right headphones)?&#60;/p&#62;
&#60;p&#62;I think we agree that for the interrupt/bulk transfer data types which are used for data whose integrity is maintained asking the device to wait a few frames or asking the device to resend data is essential to data integrity (but does not guarantee when data is transferred).  With interrupt/bulk transfers the devices wait until the host says the pipes are clear.&#60;/p&#62;
&#60;p&#62;Regarding bandwidth I also said:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
However, the unpredictable bandwidth problem can be &#34;solved&#34; by simply using the Maple as the only device connected to the USB port.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;This is what I was thinking.  Imagine a bulk transfer device (such as a USB drive).  Bulk communication is done after the control/interrupt/isochronous communications are completed.  Whatever is left of each time interval (1 millisecond for full speed devices) is distributed to the bulk devices.  If there are few or zero other interrupt/isochronous devices connected, most of the time available is used for bulk devices.&#60;/p&#62;
&#60;p&#62;So in the current (March 2011) Maple USB implementation the use of bulk transfer endpoints should not limit the speed much as long as the Maple is the primary USB peripheral.&#60;/p&#62;
&#60;p&#62;I remember days when a slow IDE CD ROM drive configured on a two drive cable as the &#34;sl_ve&#34; (I always hated the expression) could slow down the second device on the cable (configured as the &#34;m_aster&#34;).  Is the observation/memory of slow USB devices slowing down the whole USB chain related to the USB 1.0 spec?  Or perhaps does a single USB 1.0 device on a USB 2.0 hub slow down all the traffic to the 1.0 speed?&#60;/p&#62;
&#60;p&#62;Let me quickly return to an old question, which I think we have now answered (over the course of several exchanges).  Do we agree that during a single 1 millisecond time interval a device can send a single packet?&#60;/p&#62;
&#60;p&#62;Is this related to why the transfer types which are error free (control/interrupt/bulk) have small data packets?  If during the transfer 64 bytes of data become corrupted, requesting a resend of the data is not a big challenge to the system.  However, for isochronous data transfers if the data is transferred with errors then a choice needs to be made by the host to either use the partially corrupted data or to wait until the next frame.&#60;/p&#62;
&#60;p&#62;I think I need to read more about USB endpoints.  More questions later.&#60;/p&#62;
&#60;p&#62;Those are my thoughts for now.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forums.leaflabs.com/profile.php?id=843&#34;&#62;Stephen from NYC&#60;/a&#62; (full disclosure: I am not a member of the LeafLabs staff)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "USB Observations and Questions: Part III (Host System Polling Rates)"</title>
			<link>http://forums.leaflabs.com/topic.php?id=692#post-4022</link>
			<pubDate>Thu, 24 Mar 2011 15:33:08 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">4022@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;StephenFromNYC - cracking questions!&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;why do isochronous transfers have a CRC ...
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I had assumed that is to detect that complete payloads have arrived correctly, on the basis that there is a difference between:&#60;br /&#62;
a. dropping a packet&#60;br /&#62;
b. transfering a packet, but it got corrupted&#60;br /&#62;
c. transferring a packet, and it is complete and correct&#60;br /&#62;
But I really don't know if there is more, or less, to it than that.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;Second question: can a device use different types of endpoints? For example, can a single device be configured to simultaneously use interrupt transfers (eg for low volume data transfers where data integrity is necessary) and bulk transfers (where a large amount of data needs to be transferred, but the absolute accuracy is not needed).
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Yes, a USB device in general, *must* have multiple endpoints. (I believe I was told by someone who'd written a 'proper' USB CDC (virtual serial) device which worked with Windows, Linux, OS X, and Solaris, it should have 5 or 6, but lots of folks do it with one less.)&#60;br /&#62;
I'm not sure what is meant by &#34;... configured to simultaneously use ...&#34;. Each endpoint is a physical resource in the USB peripheral hardware. I usually mean a software choice by &#34;configured&#34;, maybe that isn't what you mean.&#60;/p&#62;
&#60;p&#62;Also &#34;and bulk transfers (..., but the absolute accuracy is not needed)&#34; do you mean isochronous transfers? Bulk transfers should always provide accurate and complete data transfer, but isochronous transfers do not.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;If this is possible to implement using a Maple board, would each of these endpoints appear as a different COM port
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;A single, simple device (like a USB CDC) is one device with it's set of one or more endpoints.&#60;/p&#62;
&#60;p&#62;The LeafLabs folks have explained (sorry can't see link) that they tried to make a more complex device (serial+DFU), but it was hard to make portable across platforms, though they were implementing two different devices, rather than several instances of the same device.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;I believe interrupt and isochronous transfers use the bInterval variable to request polling by the host at a certain frequency. A bInterval setting of 5 would request a polling by the host at least every 5 millliseconds.
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Thanks for the clarification.&#60;br /&#62;
I had read the links as saying the device asks for bandwidth, so I had thought the bInterval was derived from the bandwidth request. &#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;I think all USB devices *must* use CONTROL endpoints in order to have working USB communication&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Yes, sorry, I missed out the word CONTROL, confusing.&#60;br /&#62;
The point I was trying to making is every USB device will always have a CONTROL endpoint, and may be other endpoints.&#60;br /&#62;
Further, for all comms. which need reliable delivery in volume, there is bulk transfer available. So IMHO, that is the key transfer type to implement properly and efficiently on Maple.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;Yes, interrupt transfer configurations appear to be commonly used for peripherals such as mice and keyboards. I believe the bInterval setting for these HID (human interface devices) are approximately 5 (because a polling more frequently than 5 milliseconds seems like overkill). However, for some applications a data communication rate of 64,000 bytes/second (or even 57,000 bytes/second after overhead) may be more than enough. This can be achieved using an interrupt transfer type if bInterval is set to 1 milliseconds and a 64 byte data packet is used. 64,000 bytes/second is a lot and many things can be done with this amount data. Not quite 16-bit CD quality stereo audio, but close.
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I'm not sure what you are planning, but CD is sampled at 44,100 Hz, in 16 bits, and stereo doubles that to get 176,000 bytes, quite a lot more than 57,000 bytes.&#60;/p&#62;
&#60;p&#62;But that is only half the story. There needs to be a host-side driver which will use the transfer. If you're planning on writing your own host-side USB driver, then you can achieve a lot more. But we'd need to do some tests if the plan is to use existing drivers, and the USB spec's define the protocols, and hence which end points and transfer types are used.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;Up to this point our (gbulmer and mine) understandings do not vary too much. Our descriptions may vary a little, probably due to our desire to write succinctly.
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Yes, agreed.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;Next is a place where I believe we differ. I believe each and every (for redundant emphasis) time frame includes a control transfer between the host and the device. See the bottom of this page (in the &#34;Bandwidth Management&#34; section):&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.beyondlogic.org/usbnutshell/usb4.shtml#Bulk&#34; rel=&#34;nofollow&#34;&#62;http://www.beyondlogic.org/usbnutshell/usb4.shtml#Bulk&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;where it says &#34;if you have a highly saturated bus with periodic transfers, the remaining 10% is left for control transfers and once those have been allocated, bulk transfers will get its slice of what is left.&#34;
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;The linked text says &#34;... allowing no more than 90% of any frame to be allocated for periodic transfers (Interrupt and Isochronous) on a full speed bus ...&#34;&#60;br /&#62;
So that 90% does not include control transfers. My reading of them not being periodic is that they can't, by definition, be scheduled as regular transfers.&#60;/p&#62;
&#60;p&#62;Then as you quote, 10% is left for control transfers and bulk transfers.&#60;br /&#62;
But it doesn't say there *MUST* be control transfers to every device in every frame.&#60;/p&#62;
&#60;p&#62;You may be correct that every frame does have one or more control transfers for every device.&#60;br /&#62;
I have oscillated on this. I had assumed there must be a control transfer for every device, on every frame, but I haven't been able to confirm that. If you have spotted something which categorically confirms or denies that, please post a reference.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;I believe the Maple currently uses bulk transfers for data transfers (and of course control transfer for coordination of exchanges).
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I believe so too. Maple currently implements a USB CDC device and a USB DFU device, and hence must use the transfer types dictated by those USB specifications and host device driver implementations. &#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;... Theoretically, this would allow high theoretical transfer rates. However, the unpredictable bandwidth problem can be &#34;solved&#34; by simply using the Maple as the only device connected to the USB port.
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I am unsure about the later point about &#34;solving&#34; unpredictable bandwidth problem by using Maple as the only device connected to the USB port. A while ago (several years), I believe USB ports might be connected internally to a USB hub, and I believe that bandwidth might then be shared. I also vaguely recall that a low-speed device on a USB hub, constrained the whole hub. I believe this is a complex area, and I might be too out of date :-)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>StephenFromNYC on "USB Observations and Questions: Part III (Host System Polling Rates)"</title>
			<link>http://forums.leaflabs.com/topic.php?id=692#post-4011</link>
			<pubDate>Wed, 23 Mar 2011 12:18:49 +0000</pubDate>
			<dc:creator>StephenFromNYC</dc:creator>
			<guid isPermaLink="false">4011@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello-&#60;/p&#62;
&#60;p&#62;First two questions which have been bothering me.  If isochronous transfers, which are often used for streaming data transfers where the &#34;timing&#34; is critical do not allow resending of the data if a transmission error occurs, why do isochronous transfers have a CRC:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.beyondlogic.org/usbnutshell/usb4.shtml#Isochronous&#34; rel=&#34;nofollow&#34;&#62;http://www.beyondlogic.org/usbnutshell/usb4.shtml#Isochronous&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;If an error occurs is the data discarded by the host or is the data send to the host application with the warning &#34;use this data if you want, but it has errors&#34;?&#60;/p&#62;
&#60;p&#62;Second question: can a device use different types of endpoints?  For example, can a single device be configured to simultaneously use interrupt transfers (eg for low volume data transfers where data integrity is necessary) and bulk transfers (where a large amount of data needs to be transferred, but the absolute accuracy is not needed).  If this is possible to implement using a Maple board, would each of these endpoints appear as a different COM port (eg. COM7 for the interrupt transfers and COM8 for the bulk transfers)?  I assume a combination scanner/FAX/printer uses bulk transfers for all three functions.  My assumption is that separate endpoints are set up for each function.  I do not have such a multifunction device, so I do not know how it appears if tested using a USB analyzer.&#60;/p&#62;
&#60;p&#62;Reviewing and summarizing is a good strategy for clarification, especially when an early mistake may affect later statements.  I am glad when others catch my mistakes or ask me to clarify unclear statements/questions.  We all learn and everyone benefits.&#60;/p&#62;
&#60;p&#62;gbulmer said:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
On USB Full-Speed devices (12MBit/s) like Maple, this is supposed to happen at 1 milli second intervals&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;I believe this statement is largely correct, but not all the time.  It is true that on full speed systems the smallest time frame is 1 milliseconds (in contrast to high speed USB where 125 microsecond microframes are allowed).  I do not know the most common polling intervals used by full speed devices, but 1 millisecond intervals are not required.  I believe interrupt and isochronous transfers use the bInterval variable to request polling by the host at a certain frequency.  A bInterval setting of 5 would request a polling by the host at least every 5 millliseconds.&#60;/p&#62;
&#60;p&#62;However, I believe the bInterval is the maximimum interval a device needs to wait, but that polling may occur more frequently if the bus is free (eg. if your Maple device is the only device connected to the port).  In a previous post gbulmer appears to agree with this interpretation.  I am trying to confirm this in the USB 2.0 specs (remember, it is 650 pages long).  This may have implications for optimizing the libmaple implementation, which has a timeout value of 50 milliseconds, if a device wants to send a series of data packets which are smaller or the same size as the device buffer.  A data packet which is not full may mean no more data will be generated at the moment.  However, a data packet which is full may mean more data will be added to the device buffer after the transfer or by (bad) luck the data buffer is full and no more data will be added.  I believe there is a parameter, possible the use of the zero-length packet (ZLP), in the communication protocols which helps the host/device determine if the latter (full buffer but no more immediate data) is true.&#60;/p&#62;
&#60;p&#62;My reading of the USB literature agrees with gbulmer's short four line summary of the names/uses/speeds of Control, Interrupt, Bulk, and Isochronous transfers.&#60;/p&#62;
&#60;p&#62;I agree that isochronous transfers cannot be the default type used (or the initial type developed) on the Maple, because data can be lost.  However, for streaming video and music applications the guaranteed latency and the high data capacity of isochronous are required.&#60;/p&#62;
&#60;p&#62;Yes, interrupt transfer configurations appear to be commonly used for peripherals such as mice and keyboards.  I believe the bInterval setting for these HID (human interface devices) are approximately 5 (because a polling more frequently than 5 milliseconds seems like overkill).  However, for some applications a data communication rate of 64,000 bytes/second (or even 57,000 bytes/second after overhead) may be more than enough.  This can be achieved using an interrupt transfer type if bInterval is set to 1 milliseconds and a 64 byte data packet is used.  64,000 bytes/second is a lot and many things can be done with this amount data.  Not quite 16-bit CD quality stereo audio, but close.&#60;/p&#62;
&#60;p&#62;Up to this point our (gbulmer and mine) understandings do not vary too much.  Our descriptions may vary a little, probably due to our desire to write succinctly.&#60;/p&#62;
&#60;p&#62;However, in his most recent post gbulmer said:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
So the only options for volume data are Control or Bulk transfers.&#60;/p&#62;
&#60;p&#62;I believe that the all USB devices *must* use transfer endpoints in order to have working USB communicatiuon. Though I believe it is possible to have only one. So I assume the Msaple does use transfer endpoints.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;gbulmer, are your quoting/paraphrasing me here?  I think all USB devices *must* use CONTROL endpoints in order to have working USB communication (see below).  Maybe I am confused here.&#60;/p&#62;
&#60;p&#62;I think we both agree that for low amounts of data (less than a theoretical maximum of 64,000 bytes/sec) interrupt transfers can be theoretically used.  I believe that most USB memory sticks (where large volumes of data may be transferred) use bulk transfers.  However, I do not think control transfers are an option for data transfer.  I do not think control transfers can be used to send any &#34;user data&#34; between the host and device.  I think I tried saying this in my &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=692#post-3994&#34;&#62;previous post&#60;/a&#62;.  I do not know if I am more clear here.&#60;/p&#62;
&#60;p&#62;Yes, I definitely agree that control transfers are used when a device is first connected to a host.  This allows the host and device to talk to establish which protocols they will be using (eg. full speed vs high speed, polling interals, etc).&#60;/p&#62;
&#60;p&#62;Next is a place where I believe we differ.  I believe each and every (for redundant emphasis) time frame includes a control transfer between the host and the device.  See the bottom of this page (in the &#34;Bandwidth Management&#34; section):&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.beyondlogic.org/usbnutshell/usb4.shtml#Bulk&#34; rel=&#34;nofollow&#34;&#62;http://www.beyondlogic.org/usbnutshell/usb4.shtml#Bulk&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;where it says &#34;if you have a highly saturated bus with periodic transfers, the remaining 10% is left for control transfers and once those have been allocated, bulk transfers will get its slice of what is left.&#34;&#60;/p&#62;
&#60;p&#62;Control frames are used every 1 milliseconds if polling is done using this bInterval setting.&#60;/p&#62;
&#60;p&#62;I believe the Maple currently uses bulk transfers for data transfers (and of course control transfer for coordination of exchanges).  Theoretically, this would allow high theoretical transfer rates.  However, the unpredictable bandwidth problem can be &#34;solved&#34; by simply using the Maple as the only device connected to the USB port.&#60;/p&#62;
&#60;p&#62;I agree, at the bottom of &#60;a href=&#34;http://www.lvr.com/usb_virtual_com_port.htm&#34; rel=&#34;nofollow&#34;&#62;http://www.lvr.com/usb_virtual_com_port.htm&#60;/a&#62; there are a lot of good concepts, which I am still digesting, in the &#34;Maximizing Performance&#34; section.&#60;/p&#62;
&#60;p&#62;I am looking forward to seeing how DMA is implemented in IDE 0.1.0 and if it works well with the &#60;code&#62;SerialUSB&#60;/code&#62; functions.&#60;/p&#62;
&#60;p&#62;Thanks!&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forums.leaflabs.com/profile.php?id=843&#34;&#62;Stephen from NYC&#60;/a&#62; (full disclosure: I am not a member of the LeafLabs staff)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "USB Observations and Questions: Part III (Host System Polling Rates)"</title>
			<link>http://forums.leaflabs.com/topic.php?id=692#post-4001</link>
			<pubDate>Tue, 22 Mar 2011 19:49:30 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">4001@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;StephenFromNYC - good stuff!&#60;/p&#62;
&#60;p&#62;I think I either don't understand, or their is an error in your post. Maybe it is worth summarising a little bit, and then examine the details, identify the area which I think is different, and I'll add the things I don't yet understand.&#60;/p&#62;
&#60;p&#62;As you have explained, all USB transfers are initiated by the host. The USB device is polled by the USB host, and must wait until the host interacts with it. On USB Full-Speed devices (12MBit/s) like Maple, this is supposed to happen at 1 milli second intervals.&#60;/p&#62;
&#60;p&#62;There are only four possible types of transfer, which have different properties, these are the intended uses:&#60;br /&#62;
Control -  primarily used by the host to query the device - max 832Kbyte/s&#60;br /&#62;
Interrupt - small data size 'events' from the device to host - max 64KByte/s&#60;br /&#62;
Bulk - large volumes of data, uses remaining bandwidth so unpredictable - max 1,216KBye/s&#60;br /&#62;
Isochronous - time constrained data, can reserve bandwidth, but packets may get lost - max 1,023Kbytes/s&#60;/p&#62;
&#60;p&#62;Isochronous transfer type is potentially hard to use because data may be silently dropped, so if all the data must get through, which is usually the case, the Maple would have to layer more stuff on top, so IMHO that can't be the default transfer used by Maple.&#60;/p&#62;
&#60;p&#62;Interrupt is intended for small units of data (the example is a HID device like a mouse), that IMHO it can't be the default either. But pjrc Teensy do use the HID device for a boot loader, so it is flexible.&#60;/p&#62;
&#60;p&#62;So the only options for volume data are Control or Bulk transfers.&#60;/p&#62;
&#60;p&#62;I believe that the all USB devices *must* use transfer endpoints in order to have working USB communicatiuon. Though I believe it is possible to have only one. So I assume the Msaple does use transfer endpoints.&#60;/p&#62;
&#60;p&#62;My reading of the USB spec is that, when you define your own device, and produce your own host-side device drivers, you can do anything with these transfer types, BUT, the control transfers will be used by the host to figure out what the device is when it is plugged in, or at start up.&#60;/p&#62;
&#60;p&#62;When trying to emulate an existing device, so that an existing host-side device driver will interact with the device, the device has to comply with the host drivers use of transfer types. I believe there is a 'chat' bwetween the host and device (using Control transfers), so there may be a bit of negotiation, but ultimately the host side driver constrains what can happen.&#60;/p&#62;
&#60;p&#62;So, the host driver constrains the type of transfers that can be used on the types of endpoints.&#60;/p&#62;
&#60;p&#62;I believe the Control transfers have to be to a specific endpoint, so that he protocol can 'bootstrap' itself, but I can't find a reference to that at this moment.&#60;/p&#62;
&#60;p&#62;Looking at &#60;a href=&#34;http://www.lvr.com/usb_virtual_com_port.htm&#34; rel=&#34;nofollow&#34;&#62;http://www.lvr.com/usb_virtual_com_port.htm&#60;/a&#62; which describes an example of a 'virtual serial port', there seems to be very little room for maneuver. It does explain that the USB device descriptor *must* set the maximum packet size to 64 bytes, or their will only be one packet transferred/transer, and hence less than 64 bytes/millli-second. &#60;/p&#62;
&#60;p&#62;The example does use multiple bulk transfer endpoints. I assume it must use at least two end points to get concurrent bidirectional communication. &#60;/p&#62;
&#60;p&#62;I do not know if the device can offer more than two bulk transfer endpoints, whether any of the host side 'virtual serial port' drivers on Windows, OS X, and Linux will use them, and whether it makes a lot of diference to the throughput.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>StephenFromNYC on "USB Observations and Questions: Part III (Host System Polling Rates)"</title>
			<link>http://forums.leaflabs.com/topic.php?id=692#post-3994</link>
			<pubDate>Tue, 22 Mar 2011 11:00:27 +0000</pubDate>
			<dc:creator>StephenFromNYC</dc:creator>
			<guid isPermaLink="false">3994@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello-&#60;/p&#62;
&#60;p&#62;I may have found an answer to &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=692&#34;&#62;my question about the bInterval setting(s)&#60;/a&#62; used by the current implementation of USB on the Maple.&#60;/p&#62;
&#60;p&#62;Apparently, the bInterval variable is ignore (not used) for bulk/control endpoints.  This is stated in the table found at:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.beyondlogic.org/usbnutshell/usb5.shtml#EndpointDescriptors&#34; rel=&#34;nofollow&#34;&#62;http://www.beyondlogic.org/usbnutshell/usb5.shtml#EndpointDescriptors&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Does this mean Maple USB functions are implemented using bulk transfer endpoints?  I had assumed the Maple used transfer endpoints for USB functions.  The use of bulk transfers might be a partial explanation for the variation of rates which I and others have experienced.  If the &#60;code&#62;(Serial)USB&#60;/code&#62; functions are implemented using bulk endpoints then the host (which controls the bus) will transfer as much &#34;bulk&#34; data as possible in the time remaining in each interval (after the control and interrupt transfers).  This allows spurts of activity.  However, remember that bulk transfers are not guaranteed a specific size of each time interval.  However, if a bulk transfer device (such as the Maple) gets the attention of the host, then at least 1216 bytes can be transferred (see below for reference).&#60;/p&#62;
&#60;p&#62;The use of transfer endpoints (which to be clear I believe libmaple currently does not use) would limit the data transfer rates which is not desirable for some applications which need greater than 64,000 bytes/sec.  I found a reference which agrees with my calculations that with interrupt endpoints a maximum rate of of 64,000 bytes/sec is possible with full speed devices.  Here it it:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.computer-solutions.co.uk/info/Embedded_tutorials/usb_tutorial.htm#Signals&#34; rel=&#34;nofollow&#34;&#62;http://www.computer-solutions.co.uk/info/Embedded_tutorials/usb_tutorial.htm#Signals&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Yes, I agree wth a conclusion by gbulmer about &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=692#post-3959&#34;&#62;multiple control transfers per interval&#60;/a&#62;.  At the bottom of the next link the descriptions seem to say control transfers can take up to 10% of the USB bandwidth:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.beyondlogic.org/usbnutshell/usb4.shtml&#34; rel=&#34;nofollow&#34;&#62;http://www.beyondlogic.org/usbnutshell/usb4.shtml&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Remember that user data is not transferred during the control transfer!&#60;/p&#62;
&#60;p&#62;I hope this analysis helps!&#60;/p&#62;
&#60;p&#62;Thanks!&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forums.leaflabs.com/profile.php?id=843&#34;&#62;Stephen from NYC&#60;/a&#62; (full disclosure: I am not a member of the LeafLabs staff)&#60;/p&#62;
&#60;p&#62;[my current &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=690#post-3949&#34;&#62;development system&#60;/a&#62; (old, but still working)]
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "USB Observations and Questions: Part III (Host System Polling Rates)"</title>
			<link>http://forums.leaflabs.com/topic.php?id=692#post-3959</link>
			<pubDate>Fri, 18 Mar 2011 20:52:59 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3959@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;StephenFromNYC - My reading of the  &#60;a href=&#34;http://www.beyondlogic.org/usbnutshell&#34; rel=&#34;nofollow&#34;&#62;http://www.beyondlogic.org/usbnutshell&#60;/a&#62; stuff is at each host-&#38;gt;device polling 'event' a set of transactions between the host and device can exchange multiple packets of data &#60;/p&#62;
&#60;p&#62;For example &#60;a href=&#34;http://www.beyondlogic.org/usbnutshell/usb4.shtml#Control&#34; rel=&#34;nofollow&#34;&#62;http://www.beyondlogic.org/usbnutshell/usb4.shtml#Control&#60;/a&#62;&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;The optional Data Stage consists of one or multiple IN or OUT transfers. The setup request indicates the amount of data to be transmitted in this stage. If it exceeds the maximum packet size, data will be sent in multiple transfers each being the maximum packet length except for the last packet.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;So I believe this clearly states that data can be larger than a packet, and multiple IN or OUT transfers may be completed.&#60;/p&#62;
&#60;p&#62;(full disclosure: I am not a LeafLabs staffer)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>StephenFromNYC on "USB Observations and Questions: Part III (Host System Polling Rates)"</title>
			<link>http://forums.leaflabs.com/topic.php?id=692#post-3944</link>
			<pubDate>Thu, 17 Mar 2011 16:13:31 +0000</pubDate>
			<dc:creator>StephenFromNYC</dc:creator>
			<guid isPermaLink="false">3944@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello-&#60;/p&#62;
&#60;p&#62;[Note: &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=688&#34;&#62;Part II&#60;/a&#62; is simply a list of links to more USB resources]&#60;/p&#62;
&#60;p&#62;I think my understanding of USB polling is improving.  I will try to limit my observations and questions to full speed devices (such as the Maple).  There are some differences with configuring and programming high speed USB devices, but I will not describe the differences, because it will only make things more confusing.&#60;/p&#62;
&#60;p&#62;As stated in my &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=685&#34;&#62;earlier post&#60;/a&#62; (Part I) I still believe the host computer has the ability to split the attention it gives all the connected USB devices into 1 millisecond time slices.  Each connected USB device specifies how frequently it wants the attention of the host (see below), but it is up to the host to poll the attached devices.  Each device cannot say &#34;I am ready now&#34;.  Each device needs to be patient until it is polled by the host system.&#60;/p&#62;
&#60;p&#62;The Lakeview Research web page (&#60;a href=&#34;http://www.lvr.com/usbfaq.htm&#34;&#62;http://www.lvr.com/usbfaq.htm&#60;/a&#62;) says for &#34;full-speed interrupt endpoints, the descriptor's bInterval value indicates the requested maximum number of milliseconds between transaction attempts&#34;.&#60;/p&#62;
&#60;p&#62;If I understand this correctly, different devices on the USB chain can request different intervals.  DeviceA may request the host system's attention every 5 milliseconds, while Device B may request the host system's attention every 20 milliseconds.  In other words, the system does not poll all the USB devices every 1, 5, or 10 milliseconds.  The rate of polling can be different for each device.&#60;/p&#62;
&#60;p&#62;Maybe I am thinking too much about a single word, but I do not know why the Lakeview Research page says &#34;&#60;strong&#62;maximum&#60;/strong&#62;&#34; time.  Does this mean the polling may occur more frequently than the bInterval value?  For example, if a device states (see below) that it wants the attention of the host every 10 milliseconds (100 times a second) is it possible the device might be occasionally polled every 5 milliseconds?  To me an unpredictable polling can cause problems.  For example, assume a USB device collects data for 6 milliseconds and then processes the data for 2 milliseconds, before waiting for the host to poll (win a 2 millisecond safety margin), before the data is sent.  If the host polls occasionally after 5 milliseconds the device will not be ready to send the processed data, and the host-device synchronization will be confused.  If the USB device is not ready to send, is the polling timer reset?  Or is the polling timer reset only when the device responds to the host?&#60;/p&#62;
&#60;p&#62;The information from &#60;a href=&#34;http://www.beyondlogic.org/usbnutshell/usb5.shtml&#34;&#62;http://www.beyondlogic.org/usbnutshell/usb5.shtml&#60;/a&#62; confirms that the smallest units for full speed devices are 1 millisecond frames.  However, the beyondlogic.com information does not imply the polling may occur more frequently than the rate requested by a device.&#60;/p&#62;
&#60;p&#62;I have been digging around in the files from &#34;&#60;a href=&#34;https://github.com/leaflabs/libmaple/blob/master/libmaple/usb/&#34;&#62;https://github.com/leaflabs/libmaple/blob/master/libmaple/usb/&#60;/a&#62;&#34;:&#60;/p&#62;
&#60;p&#62;If I am correct, currently (March, 2011) the USB support on the Maple is limited to the SerialUSB functions.  Is the polling interval used by SerialUSB specified indirectly somewhere else (and not directly by the bInterval value)?&#60;/p&#62;
&#60;p&#62;I searched for variables whose names resembled &#34;bInterval&#34;.&#60;/p&#62;
&#60;p&#62;From the file &#34;&#60;a href=&#34;https://github.com/leaflabs/libmaple/blob/master/libmaple/usb/descriptors.c&#34;&#62;https://github.com/leaflabs/libmaple/blob/master/libmaple/usb/descriptors.c&#60;/a&#62;&#34;:&#60;/p&#62;
&#60;p&#62;EP1_bInterval: 0xFF // for interrupt transfers&#60;br /&#62;
EP2_bInterval: 0x00 // for bulk transfers: DataOutEndPoint&#60;br /&#62;
EP3_bInterval: 0x00 // for bulk transfers: DataInEndPoint&#60;/p&#62;
&#60;p&#62;I was expecting something in the range 1-5 (to request polling from the system in the range 1 to 5 milliseconds).&#60;/p&#62;
&#60;p&#62;Am I missing something?&#60;/p&#62;
&#60;p&#62;Second question (a repeated quested based on a calculation from my &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=685&#34;&#62;first USB post&#60;/a&#62; (Part I):&#60;/p&#62;
&#60;p&#62;The USB data packet used with SerialUSB (which I think uses &#34;interrupt transfer&#34;) is 64-bytes.&#60;/p&#62;
&#60;p&#62;Is only a single data packet transmitted per 1 millisecond time slice (or can the system poll the same device multiple times in the same time slice)?&#60;/p&#62;
&#60;p&#62;If the Maple bInterval is set to 1 milliseconds (and the system polls the Maple for USB communication every 1 milliseconds) does this mean that interrupt and bulk transfers are limited to 64,000 bytes per second?&#60;/p&#62;
&#60;p&#62;This calculation cannot be correct, since USB thumb drives (which I think use bulk transfers) can transfer at a much higher rate.&#60;/p&#62;
&#60;p&#62;Thanks!&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forums.leaflabs.com/profile.php?id=843&#34;&#62;Stephen from NYC&#60;/a&#62; (full disclosure: I am not a member of the LeafLabs staff)&#60;/p&#62;
&#60;p&#62;[my current &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=690#post-3939&#34;&#62;development system&#60;/a&#62; (old, but still working)]
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
