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

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

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

		<entry>
		<author><name><![CDATA[VUSBRalf]]></name></author>
		<updated>2010-04-28T21:44:03+02:00</updated>

		<published>2010-04-28T21:44:03+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3514&amp;p=14272#p14272</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3514&amp;p=14272#p14272"/>
		<title type="html"><![CDATA[Re: Combining BootloadHID and powerswitch]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3514&amp;p=14272#p14272"><![CDATA[
Hello,<br /><br />it seems, that obdev dont made a link to my project.  <img class="smilies" src="./../../../images/smilies/icon_sad.gif" alt=":(" title="Sad" /> <br />Here is the link for my project with bootloadhid and vusb:<br /><br /><!-- m --><a class="postlink" href="http://www.ringwelt.de/HDBeamer/HDBeamer4b1.html">http://www.ringwelt.de/HDBeamer/HDBeamer4b1.html</a><!-- m --><br /><br />I used it for ATMEGA8 and ATMEGA168, and it works were well.<br /><br />Best regards<br />Ralf<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=3313">VUSBRalf</a> — Wed Apr 28, 2010 9:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[schwa226]]></name></author>
		<updated>2010-04-26T23:43:38+02:00</updated>

		<published>2010-04-26T23:43:38+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3514&amp;p=14259#p14259</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3514&amp;p=14259#p14259"/>
		<title type="html"><![CDATA[Re: Combining BootloadHID and powerswitch]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3514&amp;p=14259#p14259"><![CDATA[
Also I have a problem with bootloadHID and (pgm_read_byte_near(0x0000) == 0xFF)<br /><blockquote class="uncited"><div>Device programming finished!<br />Reset Device now, please wait...<br />Device got removed: HIDBoot<br />DeviceArrival: HIDBoot, VID: 5824, PID: 1503</div></blockquote><br /><br />I can program the device and than the function leaveBootloader(); will be called from the bootloader and the device get reconnected.<br />But as HIDBoot again? This will  happen after every reboot after flashing.<br /><br />When I disconnect/reconnect the power from the AVR it boots correctly my application.<br />Looks like a problem with pgm_read_byte_near, but I don't have an idea how to solve this problem!<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=3520">schwa226</a> — Mon Apr 26, 2010 11:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[schwa226]]></name></author>
		<updated>2010-04-26T07:35:18+02:00</updated>

		<published>2010-04-26T07:35:18+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3514&amp;p=14247#p14247</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3514&amp;p=14247#p14247"/>
		<title type="html"><![CDATA[Re: Combining BootloadHID and powerswitch]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3514&amp;p=14247#p14247"><![CDATA[
Is there now an example how to combine an v-usb project with the bootloadHID?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=3520">schwa226</a> — Mon Apr 26, 2010 7:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[VUSBRalf]]></name></author>
		<updated>2009-12-27T13:17:06+02:00</updated>

		<published>2009-12-27T13:17:06+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3514&amp;p=12621#p12621</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3514&amp;p=12621#p12621"/>
		<title type="html"><![CDATA[Re: Combining BootloadHID and powerswitch]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3514&amp;p=12621#p12621"><![CDATA[
First: The Bootloader and the application are independently. So V-USB exists twice.<br /><br />To start the Bootloader from the application, i made some changes to the BootloadHID.<br />I use a variable in the four first bytes of the ram. If there is a special content, the bootloader will start.<br /><br /><span style="text-decoration: underline"><strong class="text-strong">Changes in the Bootloader:</strong></span><br /><strong class="text-strong">In the main.c:</strong><br /><div class="codebox"><p>Code: </p><pre><code>unsigned long __attribute__ ((section (&quot;.BOOTSTART&quot;))) startBootloader; </code></pre></div><br /><br />Search for the line with bootLoaderCondition() and replace it with:<br /><div class="codebox"><p>Code: </p><pre><code>if(bootLoaderCondition() || (startBootloader == 0x55AA1177) || (pgm_read_byte_near(0x0000) == 0xFF))</code></pre></div><br />The bootloader will start if:<br /><ul><li>the jumper is set or</li><li>the variable has the special content or</li><li>no application is programmed</li></ul><br />Additional Linker settings:<br /><div class="codebox"><p>Code: </p><pre><code>LDFLAGS += -Wl,--section-start,.BOOTSTART=0x800060 </code></pre></div><br />This will use the first 4 bytes in the ram (0x60-0x63).<br /><br /><br /><span style="text-decoration: underline"><strong class="text-strong">Changes in the Application:</strong></span><br />In the main.c or where you want it:<br /><div class="codebox"><p>Code: </p><pre><code>unsigned long __attribute__ ((section (&quot;.BOOTSTART&quot;))) bootStart;</code></pre></div><br /><br />The first code in the main() is:<br /><div class="codebox"><p>Code: </p><pre><code>   // Die Vectortabelle in den Applikationssector verschieben; die beiden Befehle nicht verändern<br />   GICR = _BV(IVCE);<br />   GICR = 0x00;<br /><br />   bootStart = 0x00000000;<br /></code></pre></div><br /><br />In the usbFunctionWrite i have a command for starting the bootloader:<br /><br /><div class="codebox"><p>Code: </p><pre><code>      case COMMAND_START_BOOTLOADER:<br />             cli();<br />             USB_INTR_ENABLE = 0;<br />             USB_INTR_CFG = 0;       /* also reset config bits */<br /><br />             // Die Vectortabelle in den Bootsector verschieben; die beiden Befehle nicht verändern<br />              GICR = (1 &lt;&lt; IVCE);  /* enable change of interrupt vectors */<br />              GICR = (1 &lt;&lt; IVSEL); /* move interrupts to boot flash section */<br /><br />              bootStart = 0x55AA1177;      // Bootloader start from application<br />              for(;;);   // Reset from watchdog<br />         break;<br /></code></pre></div><br /><br />For compiling the application i use the AVR-Studio.<br />To change the linker settings goto &quot;Edit configuration options...&quot;.<br />Then goto &quot;Custom Options&quot; and click on &quot;Linker Options&quot;.<br />Here you must add the two lines:<br /><div class="codebox"><p>Code: </p><pre><code>-Wl,--section-start,.BOOTSTART=0x800060<br />-Wl,--section-start,.data=0x800064<br /></code></pre></div><br /><br />I used this code in my project for a cooling controller, i will publish soon.<br />Regards Ralf<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=3313">VUSBRalf</a> — Sun Dec 27, 2009 1:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[honda4life]]></name></author>
		<updated>2009-11-10T22:15:46+02:00</updated>

		<published>2009-11-10T22:15:46+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3514&amp;p=11916#p11916</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3514&amp;p=11916#p11916"/>
		<title type="html"><![CDATA[Combining BootloadHID and powerswitch]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3514&amp;p=11916#p11916"><![CDATA[
Hello everyone,<br /><br />I like BootloadHID, but now I want to send some data over USB, for example powerswitch to start.<br />I have absolutely no idea how I can do this.<br /><br />Do I need do write V-USB twice to the AVR, or can i use the functions of the bootloader,...<br />Please give me a start.<br /><br />Greets<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2429">honda4life</a> — Tue Nov 10, 2009 10:15 pm</p><hr />
]]></content>
	</entry>
	</feed>
