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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2013-07-15T21:23:30+02:00</updated>

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

		<entry>
		<author><name><![CDATA[curtavr]]></name></author>
		<updated>2013-07-15T21:15:29+02:00</updated>

		<published>2013-07-15T21:15:29+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8538&amp;p=25582#p25582</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8538&amp;p=25582#p25582"/>
		<title type="html"><![CDATA[Re: ATTin84 self-programming seems to wedge V-USB]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8538&amp;p=25582#p25582"><![CDATA[
Update: If I ignore the general error 31 and continue as if it suceeded..  apparently it works, I uploaded the code and it checks out.<br /><br />I am using a version of this bootloader with an Atmega88 and it does not have the error problem, sure would be nice to know what is going on, I don't mind it working but this kind of out-of-spec unknown makes me powerful nervous.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=19840">curtavr</a> — Mon Jul 15, 2013 9:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[curtavr]]></name></author>
		<updated>2013-07-15T21:23:30+02:00 </updated>

		<published>2013-07-15T21:07:40+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8538&amp;p=25581#p25581</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8538&amp;p=25581#p25581"/>
		<title type="html"><![CDATA[ATTiny84 self-programming seems to wedge V-USB]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8538&amp;p=25581#p25581"><![CDATA[
Using a Tiny84 with a 12mhz crystal clock (to free up the other B port line)  D+ on INT0 and D- on the remaining non-RESET pin.<br /><br />V-USB works just fine, I am faking a HID on a Win7 platform. I can move data back and forth without any issues, problem comes when I try and program the Flash. After executing  boot_page_write( ... ); USB just goes away, instantly, windows reports error 31:ERROR_GEN_FAILURE. A re-start of my windows-side loading app reports the device still there however, and will re-attempt upload.<br /><br />I am not posting here first, let me tell you what it's not:<br /><br />- I am programming well outside the executable area, the app is located at 0x0000, I am attempting to load code at page 0x0A00<br />- I have confirmed that the data IS written correctly, the chip is still alive, and in fact if I re-start the code upload it again loads the first page and dies, so V-USB recovers after whatever happens<br />- I have verified that the &quot;recovery&quot; is NOT the chip resetting itself.<br />- I can execute every part of my loader except the actual boot_page_write(...) command<br />- if I execute a boot_page_write(...) command on a loop, V-USB never communicates properly, ie:<br /><div class="codebox"><p>Code: </p><pre><code><br />   for(;;)<br />   {<br />      usbPoll();<br /><br />      // just run interference<br />      int j;<br />      for( j=32; j&lt;34; j++ )<br />      {<br />         for( i=0; i&lt;64; i+=2 )<br />         {<br />            boot_page_fill( i + j*64, i + j*64 );<br />         }<br />         boot_page_erase( j*64 );<br />         boot_spm_busy_wait();<br />         boot_page_write( j*64 ); // comment out ONLY THIS LINE and V-USB works, otherwise it never even enumerates<br />         boot_spm_busy_wait();<br />      }<br />   }<br /><br /></code></pre></div><br /><br />This is a bit frustrating, any help would be appreciated.<br /><br />-Curt<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=19840">curtavr</a> — Mon Jul 15, 2013 9:07 pm</p><hr />
]]></content>
	</entry>
	</feed>
