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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2017-02-16T17:31:49+02:00</updated>

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

		<entry>
		<author><name><![CDATA[kuro68k]]></name></author>
		<updated>2017-02-16T17:31:49+02:00</updated>

		<published>2017-02-16T17:31:49+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=10736&amp;p=31985#p31985</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=10736&amp;p=31985#p31985"/>
		<title type="html"><![CDATA[Re: XMEGA port]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=10736&amp;p=31985#p31985"><![CDATA[
Okay, it enumerates now. I have not tested it extensively but this is a good sign that everything is likely to operate smoothly.<br /><br />For XMEGA there are a few instructions with different timing to MEGA/TINY AVR cores, and some architectural differences like not having the CPU registers mapped into memory space. I have overcome these issues and have code working at 16MHz.<br /><br />To work at 16MHz you need a virtual port and two GPIO registers. Note that I'm talking about the internal GPIO registers, not I/O pins. I've tested using the internal pull-up on the D- pin, although it's out of spec. The virtual port is to allow SBI/CBI/IN/OUT single cycle access. GPIO0 is used to hold usbNewDeviceAddr and shave a cycle off an LDS. GPIO1 is used in place of a CPU register because as I mentioned registers are not mapped into address space.<br /><br />Ported to 24 or 32MHz it should be easy to eliminate the need for GPIOs and probably for the virtual port as well. I don't have the time or inclination to do that though, all I came for is to create a bootloader that will fit in 4k, maybe even 2k. It currently stands at 2208 bytes with -Os and the HID example code.<br /><br />Enjoy.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=22474">kuro68k</a> — Thu Feb 16, 2017 5:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kuro68k]]></name></author>
		<updated>2017-02-15T12:10:22+02:00</updated>

		<published>2017-02-15T12:10:22+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=10736&amp;p=31977#p31977</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=10736&amp;p=31977#p31977"/>
		<title type="html"><![CDATA[Re: XMEGA port]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=10736&amp;p=31977#p31977"><![CDATA[
Logic capture, looks like the response is bad perhaps?<br /><br /><img src="http://i.imgur.com/DrwsClJ.png" class="postimage" alt="Image" /><br /><br /><a href="http://i.imgur.com/DrwsClJ.png" class="postlink">http://i.imgur.com/DrwsClJ.png</a><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=22474">kuro68k</a> — Wed Feb 15, 2017 12:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kuro68k]]></name></author>
		<updated>2017-02-15T11:57:13+02:00</updated>

		<published>2017-02-15T11:57:13+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=10736&amp;p=31976#p31976</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=10736&amp;p=31976#p31976"/>
		<title type="html"><![CDATA[Re: XMEGA port]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=10736&amp;p=31976#p31976"><![CDATA[
I threw the code up on Github: <!-- m --><a class="postlink" href="https://github.com/kuro68k/vusb-xmega">https://github.com/kuro68k/vusb-xmega</a><!-- m --><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=22474">kuro68k</a> — Wed Feb 15, 2017 11:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kuro68k]]></name></author>
		<updated>2017-02-15T11:53:09+02:00</updated>

		<published>2017-02-15T11:53:09+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=10736&amp;p=31975#p31975</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=10736&amp;p=31975#p31975"/>
		<title type="html"><![CDATA[XMEGA port]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=10736&amp;p=31975#p31975"><![CDATA[
Hi. I have started porting V-USB over to XMEGA. I have it compiling and the Windows PC sees an unknown USB device. Looking at the debugger it appears that packets are being received.<br /><br />The first request that comes in is length 8, and looks like this:<br /><br /><div class="codebox"><p>Code: </p><pre><code>      bmRequestType   0x80   unsigned char{registers}@0x2066<br />      bRequest      0x06   unsigned char{registers}@0x2067<br /></code></pre></div><br /><br />This is a request to read the device descriptor and looks valid. But the device is coming up as unknown and Windows doesn't seem to see the VID/PID, as if the response is not valid.<br /><br />Has anyone else had success with this? I'm using a 128A3U and 16Mhz crystal for timing, with code being a slight variation of the 16MHz original. I'm using a virtual port so that single cycle access is possible, the same as on MEGA and TINY AVRs.<br /><br />Any recommendations on good tools for debugging? I'm going to get my logical analyzer running when I find time.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=22474">kuro68k</a> — Wed Feb 15, 2017 11:53 am</p><hr />
]]></content>
	</entry>
	</feed>
