| Author |
Message |
|
|
Posted: Sep 19, 2011 - 02:31 AM |
|


Joined: Jun 16, 2006
Posts: 616
Location: Sarasota, FL
|
|
I have my first Xprotolab prototype using the XMEGA with USB microcontroller (you can take a look at the schematic here). The Xprotolab is working, although no USB yet.
I have downloaded AVR Studio 5 and all recent updates, including the XMEGA update.
I can't seem to find any XMEGA USB examples. And when I create a new project, I tried adding drivers from the ASF, it says I have no defined board, and that I should select a board from the example projects, but I don't want to use any of those evaluation boards.
I am new to AS5. I am new to USB.
Has anyone started using the XMEGA w/ USB?
Any advice? |
_________________ www.gabotronics.com
|
| |
|
|
|
|
|
Posted: Sep 19, 2011 - 05:11 AM |
|


Joined: Jun 16, 2006
Posts: 616
Location: Sarasota, FL
|
|
I imported my AS4 project into AS5, I get this error:
"Error 3 MCU 'atxmega32a4u' supported for assembler only S:\Projects\AVR\xprotolab\source-for-hardware-1.7\awg.c 1 1 Xprotolab"
If I select atxmega32a4, it does work. |
_________________ www.gabotronics.com
|
| |
|
|
|
|
|
Posted: Sep 19, 2011 - 07:05 AM |
|


Joined: Jan 23, 2004
Posts: 9831
Location: Trondheim, Norway
|
|
|
|
|
|
|
Posted: Sep 19, 2011 - 03:10 PM |
|


Joined: Jun 16, 2006
Posts: 616
Location: Sarasota, FL
|
|
Hi Dean, thanks.
Yes, I have those patches installed.
I created a new project instead and added the source files. Now I get these messages:
#warning "F_CPU not defined for <util/delay.h>"
#error "No SLEEP mode defined for this device." |
_________________ www.gabotronics.com
|
| |
|
|
|
|
|
Posted: Sep 19, 2011 - 07:32 PM |
|


Joined: Jun 16, 2006
Posts: 616
Location: Sarasota, FL
|
|
I fixed the F_CPU define.
I opened a new thread about the sleep.h in the AS5 forum to get more exposure there. |
_________________ www.gabotronics.com
|
| |
|
|
|
|
|
Posted: Sep 19, 2011 - 08:48 PM |
|

Joined: Feb 03, 2006
Posts: 38
Location: Trondheim, Norway
|
|
There are USB examples for the ATxmega32A4U on the STK600 in the ASF example projects provided with AVR Studio 5. (File -> new -> example projects); these demonstrates how to get started with the USB stack and the available USB classes.
the STK600 projects will give you board and init code that you can modify to suit your own hardware. |
|
|
| |
|
|
|
|
|
Posted: Sep 20, 2011 - 09:13 AM |
|

Joined: Feb 03, 2006
Posts: 38
Location: Trondheim, Norway
|
|
| One example for the ATxmega32A4U is the "USB Device CDC Example - STK600"; you can see the device at the end of the description to the right. (there are two of that example; one for the A3BU and one for the 32A4U). |
|
|
| |
|
|
|
|
|
Posted: Sep 27, 2011 - 04:35 PM |
|


Joined: Jun 16, 2006
Posts: 616
Location: Sarasota, FL
|
|
Thanks alohre.
The example references application note AVR4907, when will this be available?
Also, why is the example so heavy (9968 bytes)? I was expecting something less than 1k. (The V-USB software implementation on an AVR is under 1400 bytes). |
_________________ www.gabotronics.com
|
| |
|
|
|
|
|
Posted: Sep 27, 2011 - 04:55 PM |
|


Joined: Jul 18, 2005
Posts: 62354
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
|
Quote:
Also, why is the example so heavy (9968 bytes)?
When I've "played" with both LUFA (and the PIC equivalent USB libs) I've typically found that there's always a 4K..8K overhead to pay before you actually get to do much sensible. As the whole points of these libs is to hide the implementation I've never bothered to look in much detail as to what the over-head actually is but it has often made me wonder what point there is in 8K USB chips when you may use almost all of it before you get started.
Another indication is that USB bootloaders (which are presumably "USB stripped to the bone"?) are typically around the 4KB mark. |
_________________
|
| |
|
|
|
|
|
Posted: Sep 28, 2011 - 07:09 PM |
|

Joined: Sep 28, 2011
Posts: 2
|
|
|
|
|
|
|
Posted: Sep 28, 2011 - 08:55 PM |
|

Joined: May 09, 2009
Posts: 113
|
|
| Do the new XMEGA USB chips have host USB functionality ? |
|
|
| |
|
|
|
|
|
Posted: Sep 28, 2011 - 09:03 PM |
|


Joined: Jun 16, 2006
Posts: 616
Location: Sarasota, FL
|
|
Thanks Kevin, I'll check it out. What do would you say it is missing to be complete?
@westco: no, they do not have host functionality |
_________________ www.gabotronics.com
|
| |
|
|
|
|
|
Posted: Sep 28, 2011 - 11:50 PM |
|


Joined: Jan 23, 2004
Posts: 9831
Location: Trondheim, Norway
|
|
|
Quote:
Do the new XMEGA USB chips have host USB functionality ?
No.
- Dean  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|
Posted: Sep 29, 2011 - 05:27 AM |
|


Joined: Apr 19, 2011
Posts: 47
Location: Vancouver, CA
|
|
|
ganzziani wrote:
And when I create a new project, I tried adding drivers from the ASF, it says I have no defined board, and that I should select a board from the example projects, but I don't want to use any of those evaluation boards.
I've only played with ASF as a standalone toolkit so I can't be too specific on the UI, but I expect there is a drop down menu somewhere in AS 5 that selects the board type to use for your project. If you select XMEGA A1 XPLAINED, for instance, it will translate to the equivalent of a "#define BOARD XMEGA_A1_XPLAINED" value passed to the build system, and that will be used in common/boards/board.h to include a board-specific #include file.
You should have the option of choosing a user-defined board in that menu, which will cause board.h to try to include "user_board.h". Your job is then to create that file and populate it with whatever I/O definitions you want to use for your own board. Look at any of the existing board files and you'll see what kind of things you may want to put there. |
|
|
| |
|
|
|
|
|
Posted: Sep 29, 2011 - 09:43 PM |
|


Joined: Mar 27, 2009
Posts: 125
Location: Hellas
|
|
|
|
|
|
|