<?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/4115" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2010-04-20T09:44:40+02:00</updated>

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

		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2010-04-16T17:01:02+02:00</updated>

		<published>2010-04-16T17:01:02+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4115&amp;p=14145#p14145</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4115&amp;p=14145#p14145"/>
		<title type="html"><![CDATA[Re: Weird VUSB Linux disconnect...]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4115&amp;p=14145#p14145"><![CDATA[
really?  I wonder if its related to my problem<br /><br /><!-- l --><a class="postlink-local" href="http://forums.obdev.at/viewtopic.php?f=8&amp;t=4149">viewtopic.php?f=8&amp;t=4149</a><!-- l --><br /><br />Please see if you can dig that up, maybe I need to update my v-usb firmware.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Fri Apr 16, 2010 5:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[PHermansson]]></name></author>
		<updated>2010-04-16T08:27:08+02:00</updated>

		<published>2010-04-16T08:27:08+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4115&amp;p=14139#p14139</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4115&amp;p=14139#p14139"/>
		<title type="html"><![CDATA[Re: Weird VUSB Linux disconnect...]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4115&amp;p=14139#p14139"><![CDATA[
My devices works with Ubuntu 9.10 if connected to a hub, but not if connected directly to the USB-ports on the computer. I once saw a bug-report about that, will see if I find it again.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1395">PHermansson</a> — Fri Apr 16, 2010 8:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[klaute_]]></name></author>
		<updated>2010-04-20T09:44:40+02:00 </updated>

		<published>2010-04-09T15:01:34+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4115&amp;p=14055#p14055</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4115&amp;p=14055#p14055"/>
		<title type="html"><![CDATA[Weird VUSB Linux disconnect...]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4115&amp;p=14055#p14055"><![CDATA[
Hi,<br /><br />i've got a interesting problem while connecting my AVR with VUSB to a ASRock mini PC (running ubuntu linux 9.4).<br />I'm using VUSB (20090822) as a hiddata device on a ATMega32-16PU (16MHz).<br /><br />At first, this is my usbconfig.h. I've removed the unchanged default lines and device strings in this post...<br /><br /><div class="codebox"><p>Code: </p><pre><code>...<br />#define USB_CFG_IOPORTNAME      B<br />/* This is the port where the USB bus is<br /> * &quot;B&quot;, the registers PORTB, PINB and DD<br /> */<br />#define USB_CFG_DMINUS_BIT      1<br />/* This is the bit number in USB_CFG_IOP<br /> * This may be any bit in the port.<br /> */<br />#define USB_CFG_DPLUS_BIT       2<br />...<br />#define USB_CFG_INTR_POLL_INTERVAL      200<br />/* If you compile a version with endpoint 1 (interrupt-in), this is the poll<br /> * interval. The value is in milliseconds and must not be less than 10 ms for<br /> * low speed devices.<br /> */<br />#define USB_CFG_IS_SELF_POWERED         1<br />/* Define this to 1 if the device has its own power supply. Set it to 0 if the<br /> * device is powered from the USB bus.<br /> */<br />#define USB_CFG_MAX_BUS_POWER           100<br />...<br />#define USB_CFG_DEVICE_CLASS        0    /* set to 0 if deferred to interface */<br />#define USB_CFG_DEVICE_SUBCLASS     0<br />/* See USB specification if you want to conform to an existing device class.<br /> * Class 0xff is &quot;vendor specific&quot;.<br /> */<br />#define USB_CFG_INTERFACE_CLASS     3   /* define class here if not at device level */<br />//#define USB_CFG_INTERFACE_CLASS     0   /* define class here if not at device level */<br />#define USB_CFG_INTERFACE_SUBCLASS  0<br />...<br />/* ----------------------- Optional MCU Description ------------------------ */<br /><br />/* The following configurations have working defaults in usbdrv.h. You<br /> * usually don't need to set them explicitly. Only if you want to run<br /> * the driver on a device which is not yet supported or with a compiler<br /> * which is not fully supported (such as IAR C) or if you use a differnt<br /> * interrupt than INT0, you may have to define some of these.<br /> */<br />/* #define USB_INTR_CFG            MCUCR */<br />/* #define USB_INTR_CFG_SET        ((1 &lt;&lt; ISC00) | (1 &lt;&lt; ISC01)) */<br />/* #define USB_INTR_CFG_CLR        0 */<br />/* #define USB_INTR_ENABLE         GIMSK */<br />#define USB_INTR_ENABLE_BIT     INT2<br />/* #define USB_INTR_PENDING        GIFR */<br />#define USB_INTR_PENDING_BIT    INTF2<br />#define USB_INTR_VECTOR         SIG_INTERRUPT2<br /><br />#endif /* __usbconfig_h_included__ */</code></pre></div><br /><br />The usbPoll() function is called by Timer Interrupt 2, because the main loop sometimes require more than 200ms seconds to finish a cycle:<br /><br />Timer configuration as C-Code:<br /><br /><div class="codebox"><p>Code: </p><pre><code>#define USB_POLL_TCNT_START 25000 // Works only for notebooks<br /><br />...<br /><br />  // USB Poll with Timer1 (16Bit)<br />  TCCR1A = 0x00;<br />  TCCR1B = (1 &lt;&lt; CS10); // prescale = 0<br />  TCNT1 = USB_POLL_TCNT_START;<br />  TIMSK |= (1 &lt;&lt; TOIE1);</code></pre></div><br /> <br />The physical connection equals the wiki Z-Diod example and the used USB-Cable lenght is 1 meter.<br /><br />Everything works well, in case that the used PC is a notebook.<br />But in case of my ASRock mini PC the device got only identyfied in case that USB_POLL_TCNT_START is define as 45000.<br />But the problem is that the device continiously got reset send by the kernel. I've also tryied some different kernel but without any success...<br /><br />Here are a few kernel syslog messages...<br /><br /><div class="codebox"><p>Code: </p><pre><code>Apr 8 09:51:33 druebox kernel: &#91;91646.996056&#93; usb 5-2: new low speed USB device using uhci_hcd and address 4<br />Apr 8 09:51:33 druebox kernel: &#91;91647.210199&#93; usb 5-2: configuration #1 chosen from 1 choice<br />Apr 8 09:51:33 druebox kernel: &#91;91647.265686&#93; generic-usb 0003:16C0:05DF.0003: hiddev96,hidraw1: USB HID v1.01 Device &#91;klaute LEDMatrix&#93; on usb-0000:00:1d.3-2/input0<br />Apr 8 09:51:44 druebox kernel: &#91;91657.616075&#93; usb 5-2: reset low speed USB device using uhci_hcd and address 4<br />Apr 8 09:52:11 druebox kernel: &#91;91684.780095&#93; usb 5-2: USB disconnect, address 4</code></pre></div><br /><br />If some one have a idea or solution for this problem, feel free to comment.<br /><br />For mor details about the AVR's firmware have a look at <!-- m --><a class="postlink" href="https://stud.hs-heilbronn.de/~klauterb/firmware_mikesledmatrix.htm">https://stud.hs-heilbronn.de/~klauterb/ ... matrix.htm</a><!-- m --><br /><br />Thanks,<br />klaute<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=3522">klaute_</a> — Fri Apr 09, 2010 3:01 pm</p><hr />
]]></content>
	</entry>
	</feed>
