<?xml version="1.0" encoding="UTF-8"?><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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Arduino USB host &#8211; First programs.</title>
	<atom:link href="http://www.circuitsathome.com/mcu/programming/arduino-usb-host-part-2-classes/feed" rel="self" type="application/rss+xml" />
	<link>http://www.circuitsathome.com/mcu/arduino-usb-host-part-2-classes</link>
	<description>A Solder Joint</description>
	<lastBuildDate>Thu, 17 May 2012 05:09:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: João Blasius</title>
		<link>http://www.circuitsathome.com/mcu/arduino-usb-host-part-2-classes/comment-page-1#comment-11974</link>
		<dc:creator>João Blasius</dc:creator>
		<pubDate>Fri, 11 May 2012 16:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.circuitsathome.com/?p=775#comment-11974</guid>
		<description>Hello,

Thanks for the quick response.

I am getting the hrWRONGPID error in the dispatchPacket function.

The packet ID is (tokIN &#124; nDevice-&gt;bulk_in.address) so what can be wrong here...

I don&#039;t have any problems in reading or writing during the configuration process.

The dispatchPacket function also doesn&#039;t give any errors when I&#039;m writing to the bulk_in.

I only have the hrWRONGPID error when I read from the bulk_out.

The tokIN is 0b00000000 (HS=0, ISO=0, OUTNIN=0, SETUP=0) so the only thing that can be wrong in the PID is the endpoint adress.

These are the descriptors that I got during configuration:
	Configuration Descriptor: 09 02 20 00 01 01 00 80 64 
	Interface Descriptor: 09 04 00 00 02 08 06 50 00
	InEndpoint Descriptor: 07 05 81 02 40 00 00
	OutEndpoint Descriptor: 07 05 02 02 40 00 00

So the bulk_in.address is 0x81 and the bulk_out.address is 02.

And I&#039;ve initialized the bulk_out using the usb_initEndPoint function:
	bulk_out.address = address;//address = 0x02
	bulk_out.sendToggle = bmSNDTOG0;
	bulk_out.receiveToggle = bmRCVTOG0;
	bulk_out.attributes = USB_TRANSFER_TYPE_BULK;
	bulk_out.maxPacketSize = Endpoint.wMaxPacketSize;//wMaxPacketSize = 0x0040

Do you have any idea on this?

I am lost here...</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Thanks for the quick response.</p>
<p>I am getting the hrWRONGPID error in the dispatchPacket function.</p>
<p>The packet ID is (tokIN | nDevice-&gt;bulk_in.address) so what can be wrong here&#8230;</p>
<p>I don&#8217;t have any problems in reading or writing during the configuration process.</p>
<p>The dispatchPacket function also doesn&#8217;t give any errors when I&#8217;m writing to the bulk_in.</p>
<p>I only have the hrWRONGPID error when I read from the bulk_out.</p>
<p>The tokIN is 0b00000000 (HS=0, ISO=0, OUTNIN=0, SETUP=0) so the only thing that can be wrong in the PID is the endpoint adress.</p>
<p>These are the descriptors that I got during configuration:<br />
	Configuration Descriptor: 09 02 20 00 01 01 00 80 64<br />
	Interface Descriptor: 09 04 00 00 02 08 06 50 00<br />
	InEndpoint Descriptor: 07 05 81 02 40 00 00<br />
	OutEndpoint Descriptor: 07 05 02 02 40 00 00</p>
<p>So the bulk_in.address is 0&#215;81 and the bulk_out.address is 02.</p>
<p>And I&#8217;ve initialized the bulk_out using the usb_initEndPoint function:<br />
	bulk_out.address = address;//address = 0&#215;02<br />
	bulk_out.sendToggle = bmSNDTOG0;<br />
	bulk_out.receiveToggle = bmRCVTOG0;<br />
	bulk_out.attributes = USB_TRANSFER_TYPE_BULK;<br />
	bulk_out.maxPacketSize = Endpoint.wMaxPacketSize;//wMaxPacketSize = 0&#215;0040</p>
<p>Do you have any idea on this?</p>
<p>I am lost here&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oleg</title>
		<link>http://www.circuitsathome.com/mcu/arduino-usb-host-part-2-classes/comment-page-1#comment-11968</link>
		<dc:creator>oleg</dc:creator>
		<pubDate>Thu, 10 May 2012 17:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.circuitsathome.com/?p=775#comment-11968</guid>
		<description>At the moment, I don&#039;t have any working code for mass storage, sorry.</description>
		<content:encoded><![CDATA[<p>At the moment, I don&#8217;t have any working code for mass storage, sorry.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: João Blasius</title>
		<link>http://www.circuitsathome.com/mcu/arduino-usb-host-part-2-classes/comment-page-1#comment-11966</link>
		<dc:creator>João Blasius</dc:creator>
		<pubDate>Thu, 10 May 2012 17:27:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.circuitsathome.com/?p=775#comment-11966</guid>
		<description>Hello,

I am going on with the project. I am implementing a Host and I want to read a pendrive.

I am able to read and write to the control endPint wish allowed me to get the Configuration Descriptor and configure the rest of the endpoints.

Now I am writing to the out endpint with no errors but I am unable to read.

I am getting no data available (MAX_REG_HIRQ &amp; bmHXFRDNIRQ != bmHXFRDNIRQ)

I think that there is a problem with the SCSI Command that I am sending.

Do you know some &quot;Hello World&quot; command to verify that I am communicating with the pendrive?</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I am going on with the project. I am implementing a Host and I want to read a pendrive.</p>
<p>I am able to read and write to the control endPint wish allowed me to get the Configuration Descriptor and configure the rest of the endpoints.</p>
<p>Now I am writing to the out endpint with no errors but I am unable to read.</p>
<p>I am getting no data available (MAX_REG_HIRQ &amp; bmHXFRDNIRQ != bmHXFRDNIRQ)</p>
<p>I think that there is a problem with the SCSI Command that I am sending.</p>
<p>Do you know some &#8220;Hello World&#8221; command to verify that I am communicating with the pendrive?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: João Blasius</title>
		<link>http://www.circuitsathome.com/mcu/arduino-usb-host-part-2-classes/comment-page-1#comment-11867</link>
		<dc:creator>João Blasius</dc:creator>
		<pubDate>Fri, 27 Apr 2012 10:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.circuitsathome.com/?p=775#comment-11867</guid>
		<description>Hello,

The chip is dead.

The internal ppl didn&#039;t start and it should start as soon as we power it. That is when I realized that it was an hardware problem.

I&#039;ve replaced the chip and now it is working.

Thanks for the quick response.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>The chip is dead.</p>
<p>The internal ppl didn&#8217;t start and it should start as soon as we power it. That is when I realized that it was an hardware problem.</p>
<p>I&#8217;ve replaced the chip and now it is working.</p>
<p>Thanks for the quick response.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oleg</title>
		<link>http://www.circuitsathome.com/mcu/arduino-usb-host-part-2-classes/comment-page-1#comment-11832</link>
		<dc:creator>oleg</dc:creator>
		<pubDate>Tue, 24 Apr 2012 17:05:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.circuitsathome.com/?p=775#comment-11832</guid>
		<description>How long do you wait for OSCOKIRQ to assert? It is ~700 cycles on 16MHz Atmega328. Make sure you don&#039;t overflow the counter.</description>
		<content:encoded><![CDATA[<p>How long do you wait for OSCOKIRQ to assert? It is ~700 cycles on 16MHz Atmega328. Make sure you don&#8217;t overflow the counter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: João Blasius</title>
		<link>http://www.circuitsathome.com/mcu/arduino-usb-host-part-2-classes/comment-page-1#comment-11831</link>
		<dc:creator>João Blasius</dc:creator>
		<pubDate>Tue, 24 Apr 2012 17:02:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.circuitsathome.com/?p=775#comment-11831</guid>
		<description>Hello.

I am connecting Max3421e with ATXmega192A3U to have USB host.

I am using your code but I had to change it to adjust it for the ATXmega192A3U.

The functions to read an write to registers are working but now I am stuck in the reset process.

I am getting &quot;OSCOKIRQ failed to assert&quot;.

The reset is ok because the CHIPRES bit is clearing the registers that it is suppose to clear.

The problem is that the internal oscillator does not restart.

Is there some configurations that I am missing?</description>
		<content:encoded><![CDATA[<p>Hello.</p>
<p>I am connecting Max3421e with ATXmega192A3U to have USB host.</p>
<p>I am using your code but I had to change it to adjust it for the ATXmega192A3U.</p>
<p>The functions to read an write to registers are working but now I am stuck in the reset process.</p>
<p>I am getting &#8220;OSCOKIRQ failed to assert&#8221;.</p>
<p>The reset is ok because the CHIPRES bit is clearing the registers that it is suppose to clear.</p>
<p>The problem is that the internal oscillator does not restart.</p>
<p>Is there some configurations that I am missing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vik</title>
		<link>http://www.circuitsathome.com/mcu/arduino-usb-host-part-2-classes/comment-page-1#comment-11821</link>
		<dc:creator>Vik</dc:creator>
		<pubDate>Mon, 23 Apr 2012 10:18:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.circuitsathome.com/?p=775#comment-11821</guid>
		<description>I have used the header files for the USB host and the now the code is working for Arduino 0023 platform</description>
		<content:encoded><![CDATA[<p>I have used the header files for the USB host and the now the code is working for Arduino 0023 platform</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vik</title>
		<link>http://www.circuitsathome.com/mcu/arduino-usb-host-part-2-classes/comment-page-1#comment-11820</link>
		<dc:creator>Vik</dc:creator>
		<pubDate>Mon, 23 Apr 2012 08:59:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.circuitsathome.com/?p=775#comment-11820</guid>
		<description>And I get the same error for all the three sketches given in this post.</description>
		<content:encoded><![CDATA[<p>And I get the same error for all the three sketches given in this post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vik</title>
		<link>http://www.circuitsathome.com/mcu/arduino-usb-host-part-2-classes/comment-page-1#comment-11819</link>
		<dc:creator>Vik</dc:creator>
		<pubDate>Mon, 23 Apr 2012 08:55:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.circuitsathome.com/?p=775#comment-11819</guid>
		<description>I have tried the first code given in this post and I have tried it on Arduino 1.0 and on Arduino 0023 but I keep getting the below error 

In file included from sketch_apr23a.cpp:4:
C:\Users\EWAQAMU\Desktop\arduino-0023\hardware\arduino\cores\arduino/max3421e.h:11: error: expected class-name before &#039;{&#039; token

Can you please help in giving me an idea where I can be going wrong ?</description>
		<content:encoded><![CDATA[<p>I have tried the first code given in this post and I have tried it on Arduino 1.0 and on Arduino 0023 but I keep getting the below error </p>
<p>In file included from sketch_apr23a.cpp:4:<br />
C:\Users\EWAQAMU\Desktop\arduino-0023\hardware\arduino\cores\arduino/max3421e.h:11: error: expected class-name before &#8216;{&#8216; token</p>
<p>Can you please help in giving me an idea where I can be going wrong ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oleg</title>
		<link>http://www.circuitsathome.com/mcu/arduino-usb-host-part-2-classes/comment-page-1#comment-3678</link>
		<dc:creator>oleg</dc:creator>
		<pubDate>Tue, 05 Apr 2011 20:57:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.circuitsathome.com/?p=775#comment-3678</guid>
		<description>Check that all connectors are in place, especially 2x3 ICSP one. Take a good picture of your setup and e-mail it to me - I&#039;ll try to troubleshoot.</description>
		<content:encoded><![CDATA[<p>Check that all connectors are in place, especially 2&#215;3 ICSP one. Take a good picture of your setup and e-mail it to me &#8211; I&#8217;ll try to troubleshoot.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

