Atmel kindly gave me an Xplain Xmega board at one of their Xmega seminars. It’s a useful tool for ATXmega development, but it does have a couple of problems. I thought I’d mention the ones I’ve tripped over, in case anybody else sees the same problems.
Board Doesn’t Restart Properly
I’ve found that when the AVRISP2 programmer is plugged in, the Xplain always reboots properly. But when the programmer is unplugged and the board is “on its own”, so to speak, it doesn’t always reboot properly and the code in the Xmega128 doesn’t always run.
The reason is a hardware problem on the board. Atmel’s Xmega documentation states that the Xmega processors have a weak internal pullup on the reset line. If there are any external devices on the reset line, an additional external pullup may be required.
This is the case with Xplain. The ATXmega128 reset line also routes to the AT90USB1287 part on the board. It seems this small additional load is problematic for the Xmega. Adding a 10k pullup resistor to the Xmega reset line solved the problem and allowed the Xmega to reboot properly every time.
Take a look at the Xplain schematic (available on the Atmel website) to see where the reset signal goes. Personally, I found it very easy to solder an 0603 10k resistor on the back of the Xmega programming connector header, between pins 4 & 6. The 0603 was the perfect size to fit between the solder joints for pins 4 & 6 on the back of the board. But, a regular leaded resistor would work fine too.
USB Serial Interface Doesn’t Work
Yep, lots of people have pointed that out. The AT90USB1287 is supposed to implement a “virtual COM port”, allowing the Xmega to transmit & receive at 9600 board, and have that available over USB thanks to the 1287. In theory. In practice, not so much. Atmel’s USB-to-serial interface doesn’t seem to work as advertised. I was able to confirm on my board that I was giving the AT90USB1287 the 9600 baud serial data it expected, but the thing never worked. I tried different drivers etc from the Atmel website, to no avail.
In theory you can reprogram the 1287 via the USB port, using Atmel’s “FLIP” utility (available on their website). For me, that didn’t work either, and I really tried hard. No FLIP for me!
So what to do? Here are a couple of options.
Programming Atmel AVR processors has become a little more difficult with Atmel’s use of a 6-pin connector on their popular AVRISP2 programmer. This is a great little programmer, fast, cheap, and USB based.
But why oh why did they put a 6-pin connector on it, instead of the 10-pin connector they use almost everywhere else? Almost all of their development boards, including the Xplain, have 10-pin programming headers. But this little programmer has a 6-pin connector. So you need to make yourself an adaptor board, or adaptor cable, before you can even use it. What were they thinking?
In fact, ideally you need to make two different 6-to-10 pin adaptors. One for Xmega devices that use the PDI programming interface (see my previous post), and a different one for all the other AVR parts that use the older “SPI” or “ISP” programming interface.
There you have it. A pull-up resistor to cure the “Xplain doesn’t reset” problem, and a couple of options if your Xplain USB to serial doesn’t work. Have fun!
5 Responses
Dean Camera
25|Nov|2009 1Hi Frank,
Just a minor correction to your excellent post. My LUFA project does indeed contain a USBtoSerial demo which converts between a USB port and a physical serial port, however I’ve been told this won’t work on the XPLAIN board as the XMEGA->AT90USB link is via a software and not hardware UART. That said, as of this morning, there is a new “XMEGABridge” project in the LUFA SVN which should implement the required software USART bridge to restore that functionality to the XPLAIN boards.
Cheers!
- Dean
frank
25|Nov|2009 2That is indeed a good note – thanks! I have updated the post.
ArnodB
05|Dec|2009 3> In theory you can reprogram the 1287 via the USB port, using Atmel’s “FLIP” utility
> (available on their website). For me, that didn’t work either, and I really tried hard. No FLIP for me!
Old Rev 1 Xplains didn’t have the necessary bootloader in the 1287. Rev 2 and later ones have it, but the procedure described in AVR1907 to enter the bootloader is incomplete. I have summarized my experience in http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=645225 I use Ubuntu, but checked that the pushbuttons I added works with FLIP under Windows, too.
Dean Camera
15|Dec|2009 4And another update – I’ve just finished a first revision of an XPLAIN programmer firmware for the onboard AT90USB1287, also located in the LUFA SVN as well as this AVRFreaks thread: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=87393. When loaded, it will cause the XPLAIN board to enumerate as an Atmel AVRISP-MKII which (with the latest AVRStudio release) can PDI program the onboard XMEGA.
- Dean
Kenneth Scharf
26|Feb|2010 5Actually the avrispMKII DOES support the 10 pin cable without an adapter. Atmel just didn’t supply the cable. Get or make up a short cable with a 10 pin connector on each end. Snap open the avrisp (you have to insert a screwdriver into the plastic clamps holding the case together while prying it open with another screwdriver. It looks hard to do, but it opens easily. You’ll see that the PC board has BOTH connectors on it. In the event that they have depopulated the 10 pin connector from the board you’ll have to solder one to the provided pads, however the units I’ve opened up had both connectors installed.
Leave a reply
Search
Categories
Archives
Links
Calendar
A design creation of Design Disease
Copyright © 2009 - Frank's Random Wanderings - is proudly powered by WordPress
InSense 1.0 Theme by Design Disease.