<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/11508" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2018-10-19T11:04:48+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/11508</id>

		<entry>
		<author><name><![CDATA[horo]]></name></author>
		<updated>2018-10-19T11:04:48+02:00</updated>

		<published>2018-10-19T11:04:48+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34897#p34897</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34897#p34897"/>
		<title type="html"><![CDATA[Re: modify usbFunctionRead]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34897#p34897"><![CDATA[
Hi,<br /><br />Please have a look at the MIDI thread, esp. <!-- l --><a class="postlink-local" href="https://forums.obdev.at/viewtopic.php?f=8&amp;t=1352&amp;start=15#p9413">viewtopic.php?f=8&amp;t=1352&amp;start=15#p9413</a><!-- l --><br /><br />The code fragment mentioned is:<br /><br /><div class="codebox"><p>Code: </p><pre><code>for (;;) {<br />      PORTD ^= 0x80;<br />      wdt_reset();<br />      usbPoll();<br />      usbSetInterrupt(midiMsg, 8);<br />}</code></pre></div><br /><br />When you put a scope on line PD7 and the USB bus you can see the CPU activity (toggling PD7) and the USB activity (PD7 stays constant). This is also visible on the USB lines. My tests at debian linux on a ATmega16, 12 MHz gave:<br /><blockquote class="uncited"><div>I see activity on usb lines every 2 ms for about 120 µs (and the SOF &quot;heartbeat&quot; on D- every 1ms). So we have 6% usb load and more than 90% cpu time remaining for our application - that's ok.</div></blockquote><br />ATtiny85, 16,5 MHz, same test program, but using PB1<br /><blockquote class="uncited"><div>EDIT 20170403:<br />I did some timing tests with an empty main loop, PB1 toggles every 3µs (idle) with a gap of 150µs (USB transfer) every 2ms. <br />So we still have &gt;90% CPU time for our program available. This looks similar to my measurements from 2009.<br />Test system: Lenovo T400 with Linux 4.10.8-towo.1-siduction-amd64 #1 SMP PREEMPT siduction 4.10-14 (2017-03-31) x86_64 GNU/Linux.</div></blockquote><br /><br />HTH - Ciao, Martin<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=891">horo</a> — Fri Oct 19, 2018 11:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nxtv2]]></name></author>
		<updated>2018-09-24T20:01:26+02:00</updated>

		<published>2018-09-24T20:01:26+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34746#p34746</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34746#p34746"/>
		<title type="html"><![CDATA[Re: modify usbFunctionRead]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34746#p34746"><![CDATA[
Horo,<br />Can you please post how did you measure the real pol in your post from 2009?<br /><br />Thanks.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23891">nxtv2</a> — Mon Sep 24, 2018 8:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nxtv2]]></name></author>
		<updated>2018-09-24T19:50:16+02:00</updated>

		<published>2018-09-24T19:50:16+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34745#p34745</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34745#p34745"/>
		<title type="html"><![CDATA[Re: modify usbFunctionRead]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34745#p34745"><![CDATA[
I am using ubuntu 16.04 LTS<br />And by all my measurments<br />it IS going at 1ms.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23891">nxtv2</a> — Mon Sep 24, 2018 7:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2018-09-24T14:21:53+02:00</updated>

		<published>2018-09-24T14:21:53+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34740#p34740</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34740#p34740"/>
		<title type="html"><![CDATA[Re: modify usbFunctionRead]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34740#p34740"><![CDATA[
Again, one more time. That value does not make the OS go faster. <br /><br />If the OS is 2ms, and you set 8ms, than yes it will slow down to 8ms. If you change it to 1ms, the OS will still be 2ms. So set it to 1, and tell yourself it can not go lower, and setting it higher will only slow it down. Best to leave it at 1. <br /><br />Now, as Horo just proved and as I said many times , its up to the OS.  Windows will always be 8, its just the way it is. Linux seems to go faster. Even though it's technically illegal, linux allows lower rates. But again, Windows is allowing 8ms, and the written law is 10ms for usb low speed devices. <br /><blockquote class="uncited"><div>linux:<br />bmAttributes=2 (bulk), bIntervall don't care -&gt; 2ms poll, low cpu load<br />bmAttributes=3 (interrupt), bIntervall=1..3 -&gt; 2ms poll, low cpu load<br />bmAttributes=3 (interrupt), bIntervall=4..7 -&gt; 4ms poll, low cpu load<br />bmAttributes=3 (interrupt), bIntervall=8..15 -&gt; 8ms poll, low cpu load<br />bmAttributes=3 (interrupt), bIntervall=16..31 -&gt; 16ms poll, low cpu load<br />bmAttributes=3 (interrupt), bIntervall=0 or 32..63 -&gt; 32ms poll, low cpu load<br />bmAttributes=3 (interrupt), bIntervall=64..127 -&gt; 64ms poll, low cpu load<br />bmAttributes=3 (interrupt), bIntervall=128..255 -&gt; 128ms poll, low cpu load<br /><br />winxp:<br />bmAttributes=2 (bulk), bIntervall don't care -&gt; permanent poll, high cpu load<br />bmAttributes=3 (interrupt), bIntervall don't care -&gt; 8ms poll, low cpu load</div></blockquote><br /><br />I can not comment on that 10 version thing, or that 8 version of window (if that is even called windows anymore). I never owned it, I will never own it. So if you are on Win10 maybe things changed. Either way, the OS decides the speed and the poll rate option in V-usb will only slow it down if greater then the OS speed. <strong class="text-strong">Please understand that! <br /></strong><br />The reason it's left at 8, is to guarantee it is going to be 8 for any OS. Normally you don't want that changing from OS to OS. It is proly' ls safest to set to 10.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Mon Sep 24, 2018 2:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[horo]]></name></author>
		<updated>2018-09-24T10:55:49+02:00</updated>

		<published>2018-09-24T10:55:49+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34738#p34738</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34738#p34738"/>
		<title type="html"><![CDATA[Re: modify usbFunctionRead]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34738#p34738"><![CDATA[
Hi,<br /><br />Some time ago I did <a href="https://forums.obdev.at/viewtopic.php?f=8&amp;t=1352&amp;start=15#p9104" class="postlink">some &quot;research&quot;</a> regarding the polling speed.<br />Also my <a href="https://forums.obdev.at/viewtopic.php?f=8&amp;t=1352&amp;start=90#p32124" class="postlink">recent measurements</a> were quite similar.<br /><br />Ciao, Martin<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=891">horo</a> — Mon Sep 24, 2018 10:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nxtv2]]></name></author>
		<updated>2018-09-21T21:53:19+02:00</updated>

		<published>2018-09-21T21:53:19+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34726#p34726</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34726#p34726"/>
		<title type="html"><![CDATA[Re: modify usbFunctionRead]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34726#p34726"><![CDATA[
To further explain my point.<br /><br />When i set <div class="codebox"><p>Code: </p><pre><code>USB_CFG_INTR_POLL_INTERVAL</code></pre></div> to 1, i get 8 times faster transmission than settings it to 8.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23891">nxtv2</a> — Fri Sep 21, 2018 9:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nxtv2]]></name></author>
		<updated>2018-09-21T21:51:18+02:00</updated>

		<published>2018-09-21T21:51:18+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34725#p34725</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34725#p34725"/>
		<title type="html"><![CDATA[Re: modify usbFunctionRead]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34725#p34725"><![CDATA[
Ok Maybe i am getting it wrong.<br /><br />I meassure data rate.<br /><br />With interrupt 1 , setting it to 1ms yeilds: 8KB/s.<br />That is measured and know to be correct.<br /><br />So is that true 1ms or it is just the normal for 8ms?<br /><br /><br />I am not talking about control endpoints.<br />This is the endpoint 0x81<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23891">nxtv2</a> — Fri Sep 21, 2018 9:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2018-09-21T17:46:16+02:00</updated>

		<published>2018-09-21T17:46:16+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34722#p34722</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34722#p34722"/>
		<title type="html"><![CDATA[Re: modify usbFunctionRead]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34722#p34722"><![CDATA[
No the usb poll rate is not going at 1. Not only is that just embarrassing thing to say, it's technically impossible. You would need to prove this with a usb analyzer. A script is not suffice. <br /><br />Again, this setting is for the enpoints 1 in this case. If you are talking about control transfers then sure it could be 1 as we already discussed. That is what the setting is for and yes you can get a 1ms control transfer speed. What I'm telling you is that the USB interrupt pol rate can not go lower then 8 ms without some serious hacking. V-usb has no seettings for that because its not changeable. The host picks the speed not the device.  If you don't believe me then say that. Read back over the posts, all I'm doing is giving you info that is already known. I'm essentially digging it up for you to read for yourself but your not getting it. You are under the impression you can do some magic and cheat a well known limitation. <br /><br />Condenser. <br /><br />1, V-usb is a bit bang AVR chip that is only capable of the speed of your clock and the over head of the code. The only usb speed it can do is usb 1.1 low speed. That means 8 packets max over 8ms polls. To change this you need to fake something.... <br />2, lots of people hack drives to get a faster pol rate. Why would they do that if it was as easy as a setting. <br />3, The OS driver determines the speed capabilities. Low speed usb 1.1 is 10 ms, the host must obey this. No device can over throw the host, and the host can not over throw the driver. There is a pecking order for a reason. <br />4, You really think your the first one to try this? A team of hackers had to Hack v-usb to get it to fake an xbox device in to think it a full speed device. You think they would go thru all of that trouble if they could change a number?<br />5, Your proof is a py script?  It is more then likely just reading the descriptor. If you set the descriptor to a 1, what do you think it will say? Yeah... 1. Measure  the speed and you will see its still 8ms. <br />6. Why would anyone take the time to write this is the wiki &quot;The first widely used version of USB was 1.1, which was released in September 1998. The 12 Mbit/s data rate was intended for higher-speed devices such as disk drives, and the lower 1.5 Mbit/s rate for low data rate devices&quot;<br />7. About going lower then 1ms.... The USB 1.1 Keep alive signal is 1 ms apart, so it's impossible to send data outside this.  1ms would be the smallness sample rate possible. <br /><br /><br />If your so convenience it's running at 1ms, then be happy. If you think you can make it .1  or 0 (even though that is absurd ) then do it. Stop asking for help because you got this..<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Fri Sep 21, 2018 5:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nxtv2]]></name></author>
		<updated>2018-09-21T14:47:23+02:00</updated>

		<published>2018-09-21T14:47:23+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34718#p34718</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34718#p34718"/>
		<title type="html"><![CDATA[Re: modify usbFunctionRead]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34718#p34718"><![CDATA[
But it is going at 1ms <img class="smilies" src="./../../../images/smilies/icon_biggrin.gif" alt=":D" title="Very Happy" /> <br /><br />It reports in my python script at 8KB/s <br />which means it is going at 1ms.<br /><br />If i set it to 8ms it reports 1KB/s as expected.<br /><br />So i guess your the one arguing.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23891">nxtv2</a> — Fri Sep 21, 2018 2:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2018-09-21T13:35:59+02:00</updated>

		<published>2018-09-21T13:35:59+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34717#p34717</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34717#p34717"/>
		<title type="html"><![CDATA[Re: modify usbFunctionRead]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11508&amp;p=34717#p34717"><![CDATA[
#define USB_CFG_INTR_POLL_INTERVAL      1<br />/* If you compile a version with endpoint 1 (interrupt-in), this is the poll<br /> * interval. <strong class="text-strong">The value is in milliseconds and must not be less than 10 ms for<br /> * low speed devices</strong>.<br /> */<br /><br />Again, your not understating things. All the info is right in front of you. <br /><br />1) This is the setting for the endpoint 1 not the default endpoint. <br />2) V-USB is a software-only implementation of a <strong class="text-strong">low-speed </strong>USB <br />3) see bold above, it tells you, it can not go lower the 10.<br />4) This is a Hex value! Values are whole numbers so the next step lower would be 0, which means no value, what did you expect it would use 0 ms?<br /><br />Just because you can set it to a 1 does not mean its actually going that fast. Stop trying to argue with yourself, you <strong class="text-strong">WILL NOT</strong> be able to go any faster the 8ms on window using v-usb.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Fri Sep 21, 2018 1:35 pm</p><hr />
]]></content>
	</entry>
	</feed>
