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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2008-12-17T23:07:52+02:00</updated>

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

		<entry>
		<author><name><![CDATA[sivan_toledo]]></name></author>
		<updated>2008-12-17T23:07:52+02:00</updated>

		<published>2008-12-17T23:07:52+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7153#p7153</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7153#p7153"/>
		<title type="html"><![CDATA[How to debug? AVR-USB device does not respond to host]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7153#p7153"><![CDATA[
Success at last. I had D+ and D- connected incorrectly to PB3 and PB6. Now working fine; I'm happy.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1593">sivan_toledo</a> — Wed Dec 17, 2008 11:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sivan_toledo]]></name></author>
		<updated>2008-12-17T16:54:27+02:00</updated>

		<published>2008-12-17T16:54:27+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7145#p7145</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7145#p7145"/>
		<title type="html"><![CDATA[How to debug? AVR-USB device does not respond to host]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7145#p7145"><![CDATA[
OK, I discovered one issue: I was not using the INT0 pin for D+, since I kept the PB0 and PB2 pin assignments when I ported the code from ATtiny45. Now I switched to PB6=INT0 for D+ and PB3 for D-.<br /><br />But the host still can't communicate with the device.<br /><br />I used an LED to verify that the code invokes the INT0 ISR. But there, it always jumps to sofError, never to foundK.<br /><br />Any hints on how to debug from here?<br /><br />Thanks, Sivan<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1593">sivan_toledo</a> — Wed Dec 17, 2008 4:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sivan_toledo]]></name></author>
		<updated>2008-12-17T02:22:07+02:00</updated>

		<published>2008-12-17T02:22:07+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7132#p7132</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7132#p7132"/>
		<title type="html"><![CDATA[How to debug? AVR-USB device does not respond to host]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7132#p7132"><![CDATA[
I'm still having problems.<br /><br />I now run the AVR at 3.3V with a regulator, to avoid the zener-diode issues. D- is now at 3V at rest, pulled up by a 1.5k.<br /><br />But the host still can't communicate with the device. I tried to see what is going on by turning on an LED at critical points in the code, but I am not actually sure where to check. I added a check in usbProcessRx, to see whether the device receives anything, and it does not turn on (see below).<br /><br />Is there a good way to debug this? Is there an ISR that gets invoked, or a function that is called at SE0 or before/after AVR-USB starts receiving a packet?<br /><br />Here is where I added the LED turn-on code that is never reached:<br /><br />static inline void usbProcessRx(uchar *data, uchar len)<br />{<br />usbRequest_t    *rq = (void *)data;<br />...<br />    if(usbRxToken == (uchar)USBPID_SETUP){<br />       PORTA &amp;= ~(1&lt;&lt;5);      // low is on<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1593">sivan_toledo</a> — Wed Dec 17, 2008 2:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sivan_toledo]]></name></author>
		<updated>2008-12-16T05:10:55+02:00</updated>

		<published>2008-12-16T05:10:55+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7109#p7109</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7109#p7109"/>
		<title type="html"><![CDATA[How to debug? AVR-USB device does not respond to host]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7109#p7109"><![CDATA[
Thanks. I can try to move the 2.2k resistor to the D- line (right now it's after the 68 Ohm), but I can't see why that would make a difference; the extra 68 Ohm don't make a real difference for a 2.2k.<br /><br />Maybe something else is wrong with my board. I'll try to do some more testing tomorrow with just a 2.2k resistor and the zener to see what is going on.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1593">sivan_toledo</a> — Tue Dec 16, 2008 5:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Grendel]]></name></author>
		<updated>2008-12-16T03:22:42+02:00</updated>

		<published>2008-12-16T03:22:42+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7103#p7103</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7103#p7103"/>
		<title type="html"><![CDATA[How to debug? AVR-USB device does not respond to host]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7103#p7103"><![CDATA[
W/ a tiny461/861 I have sucessfully used the following values:<br /><br />- 3V6 500mW 1N5227 to ground on D-/D+<br />- R 68 in series betw. diodes and MCU<br />- R 2k2 to Vcc on D- (at the USB connector, not after 68 !)<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=101">Grendel</a> — Tue Dec 16, 2008 3:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sivan_toledo]]></name></author>
		<updated>2008-12-15T21:04:24+02:00</updated>

		<published>2008-12-15T21:04:24+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7089#p7089</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7089#p7089"/>
		<title type="html"><![CDATA[How to debug? AVR-USB device does not respond to host]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7089#p7089"><![CDATA[
OK, I see from previous posts that 1w zeners won't work.<br /><br />I switched to 500mW ones (1N5227) and the voltage on D- is till too low, around 2.1v. I changed the 2.2k pullup to 1k, but it only pulls it up to 2.7 or 2.8v, still too low. <br /><br />Should I just reduce the pullup until I get above 3v?<br /><br />Thanks, Sivan<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1593">sivan_toledo</a> — Mon Dec 15, 2008 9:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sivan_toledo]]></name></author>
		<updated>2008-12-15T19:06:48+02:00</updated>

		<published>2008-12-15T19:06:48+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7088#p7088</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7088#p7088"/>
		<title type="html"><![CDATA[How to debug? AVR-USB device does not respond to host]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2010&amp;p=7088#p7088"><![CDATA[
Hi,<br /><br />I built an AVR-USB device using an ATtiny861 with a 16MHz crystal. The clock source works and I can program the chip using ISP. I programmed to it a project to control an I2C device.<br /><br />The chip runs at 5V and the D+ D- lines are protected by 3.6V zeners (but 1W zeners, not low-power ones as suggested).<br /><br />When I plug it in, the Linux host detects it as a low-speed device but fails to communicate with it.<br /><br />Here is what the kernel on the host says:<br /><br />usb 1-1.4: new low speed USB device using ehci_hcd and address 22<br />usb 1-1.4: device descriptor read/64, error -32<br />usb 1-1.4: device descriptor read/64, error -32<br />usb 1-1.4: new low speed USB device using ehci_hcd and address 23<br />usb 1-1.4: device descriptor read/64, error -32<br />usb 1-1.4: device descriptor read/64, error -32<br />usb 1-1.4: new low speed USB device using ehci_hcd and address 24<br />usb 1-1.4: device not accepting address 24, error -32<br />usb 1-1.4: new low speed USB device using ehci_hcd and address 25<br />usb 1-1.4: device not accepting address 25, error -32<br /><br />Any advice on how to debug this? Are the 1w zeners at fault?<br /><br />What I thought of doing is adding an LED that will tell me how far the code goes, whether it sees the hosts requests, etc. But I'll appreciate any advice.<br /><br />Thanks, Sivan Toledo<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1593">sivan_toledo</a> — Mon Dec 15, 2008 7:06 pm</p><hr />
]]></content>
	</entry>
	</feed>
