XMEGA-A1 Xplained USB ACM device in Linux

Go To Last Post
41 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is it possible to use the XMEGA-A1 Xplained board (blue PCB) as a USB ACM device in Linux, with the preloaded firmware in the AT32UC3B1256?

I am able to connect to the Xplained board in Windows using the CDC INF from pjrc (http://www.pjrc.com/teensy/cdc_a...). But in Linux (Ubuntu 10.04), I cannot connect to the Xplained board.

When I plug the Xplained board into the Windows computer, the status LED on the Xplained board turns green momentarily (about 1/2 second), flashes red, then turns green. When I plug the Xplained board into the Linux computer, the status LED turns green momentarily (about 1/2 second), flashes red, then turns off.

The device shows up as /dev/ttyACM0, I do have correct permissions to access the device.

From /var/log/messages:

May 21 20:33:47 hakpad kernel: [195426.564085] usb 3-1: new full speed USB device using uhci_hcd and address 22
May 21 20:33:47 hakpad kernel: [195426.744341] usb 3-1: configuration #1 chosen from 1 choice
May 21 20:33:47 hakpad kernel: [195426.747262] cdc_acm 3-1:1.0: ttyACM0: USB ACM device

'lsusb -v' gives me:


Bus 003 Device 025: ID 03eb:2122 Atmel Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x03eb Atmel Corp.
  idProduct          0x2122 
  bcdDevice           10.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           67
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              0 
      CDC Header:
        bcdCDC               1.10
      CDC Call Management:
        bmCapabilities       0x03
          call management
          use DataInterface
        bDataInterface          1
      CDC ACM:
        bmCapabilities       0x06
          sends break
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval             255
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
can't get device qualifier: Connection timed out
can't get debug descriptor: Connection timed out
cannot read device status, Connection timed out (110)

When I try to open /dev/ttyACM0 in minicom, there is about a 10 second pause before minicom complains 'Cannot open /dev/ttyACM0' and exits.

I have connected to other USB ACM devices using this Linux computer without problems.

Thanks in advance for any help!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have the same xplained board and the same problem. Have you solved that or found something new?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

HI,
I have the same problem.
Did you manage to get any progress how to resolve? Any news?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Exactly the same problem here. I'm totally fed up with Atmel.

From AVR1927:

Quote:
Driver installs are not necessary on Linux®
operating systems.

Hah, of course not, why would one need a driver for a non-working board?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh my god!!
I'm a AVR fans! I got the very Xpained board for Xmega, the same question!!

how to access the /dev/ttyACM0 ???

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

how to access the /dev/ttyACM0 ???

What are the permissions on it? Do you need a udev rule to give your UID access?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Quote:

how to access the /dev/ttyACM0 ???

What are the permissions on it? Do you need a udev rule to give your UID access?

Hi! Thank you for reply.

Can you access the serial port of Xplained on LinuX?

the udev rule and permission are correct.

I don't think the CDC class of Xpalined is a standard one, when I try to access the port via minicom or cutecom, kernel log show error.

when I plug the deivce to my computer:

Aug 19 22:27:16 thinkpad kernel: [1126637.607947] hub 2-1:1.0: port 1, status 0101, change 0000, 12 Mb/s
Aug 19 22:27:16 thinkpad kernel: [1126637.618925] hub 2-1:1.0: port 1 not reset yet, waiting 10ms
Aug 19 22:27:16 thinkpad kernel: [1126637.680832] usb 2-1.1: new full speed USB device using ehci_hcd and address 71
Aug 19 22:27:16 thinkpad kernel: [1126637.691828] hub 2-1:1.0: port 1 not reset yet, waiting 10ms
Aug 19 22:27:16 thinkpad kernel: [1126637.767036] usb 2-1.1: skipped 4 descriptors after interface
Aug 19 22:27:16 thinkpad kernel: [1126637.767277] usb 2-1.1: default language 0x0409
Aug 19 22:27:16 thinkpad kernel: [1126637.768028] usb 2-1.1: udev 71, busnum 2, minor = 198
Aug 19 22:27:16 thinkpad kernel: [1126637.768033] usb 2-1.1: New USB device found, idVendor=03eb, idProduct=2122
Aug 19 22:27:16 thinkpad kernel: [1126637.768039] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 19 22:27:16 thinkpad kernel: [1126637.768044] usb 2-1.1: Product: XPLAINED CDC
Aug 19 22:27:16 thinkpad kernel: [1126637.768048] usb 2-1.1: Manufacturer: ATMEL
Aug 19 22:27:16 thinkpad kernel: [1126637.768051] usb 2-1.1: SerialNumber: 056007016407
Aug 19 22:27:16 thinkpad kernel: [1126637.768227] usb 2-1.1: usb_probe_device
Aug 19 22:27:16 thinkpad kernel: [1126637.768234] usb 2-1.1: configuration #1 chosen from 1 choice
Aug 19 22:27:16 thinkpad kernel: [1126637.768386] usb 2-1.1: adding 2-1.1:1.0 (config #1, interface 0)
Aug 19 22:27:16 thinkpad kernel: [1126637.768488] usbserial_generic 2-1.1:1.0: usb_probe_interface
Aug 19 22:27:16 thinkpad kernel: [1126637.768492] usbserial_generic 2-1.1:1.0: usb_probe_interface - got id
Aug 19 22:27:16 thinkpad kernel: [1126637.768543] cdc_acm 2-1.1:1.0: usb_probe_interface
Aug 19 22:27:16 thinkpad kernel: [1126637.768549] cdc_acm 2-1.1:1.0: usb_probe_interface - got id
Aug 19 22:27:16 thinkpad kernel: [1126637.768580] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device
Aug 19 22:27:16 thinkpad kernel: [1126637.868521] usb 2-1.1: adding 2-1.1:1.1 (config #1, interface 1)
Aug 19 22:27:16 thinkpad kernel: [1126637.868670] drivers/usb/core/inode.c: creating file '071'

when I try to access the port /dev/ttyACM0, kernel said:



Aug 19 22:28:40 thinkpad kernel: [1126721.128443] usb 2-1.1: link qh128-0e01/ffff88016299e900 start 66 [1/3 us]
Aug 19 22:28:45 thinkpad kernel: [1126726.119405] usb 2-1: clear tt buffer port 1, a71 ep0 t80008d82
Aug 19 22:28:45 thinkpad kernel: [1126726.119429] usb 2-1.1: cutecom timed out on ep0out len=0/0
Aug 19 22:28:45 thinkpad kernel: [1126726.119444] usb 2-1.1: unlink qh128-0e01/ffff88016299e900 start 66 [1/3 us]
Aug 19 22:28:45 thinkpad kernel: [1126726.119459] tty_port_close_start: tty->count = 1 port count = 0.
Aug 19 22:28:50 thinkpad kernel: [1126731.110797] usb 2-1: clear tt buffer port 1, a71 ep0 t80008d82
Aug 19 22:28:50 thinkpad kernel: [1126731.110821] usb 2-1.1: cutecom timed out on ep0out len=0/0


  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Can you access the serial port of Xplained on LinuX?

Never tried - then again I don't have an Xplained. I just know that issues people have had with any form of "programming interface" on Linux in the past have been traced to a permissions issue that is fixable with udev rules. (You of course need SU powers to edit the udev rules in the first place - but achieve that with sudo)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm very sure, it's not a permission problem....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

any more suggestion....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I,m pretty sure it's a Linux issue - I've never had any success with the ACM serial devices, the old ttyUSB ones were fine.

https://bugzilla.redhat.com/show...

The R/H bug above looks like it may be related, and not yet fully fixed. I'll keep digging - there must be a solution.

Euan.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

edekock wrote:
I,m pretty sure it's a Linux issue - I've never had any success with the ACM serial devices, the old ttyUSB ones were fine.

https://bugzilla.redhat.com/show...

The R/H bug above looks like it may be related, and not yet fully fixed. I'll keep digging - there must be a solution.

Euan.

may be the avr32 serial port is not a standard CDC class device, it need a special driver for linux...
but the document from Atmel said, "no driver needed"....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is getting interesting (hopin for a solution)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, here is something to try...

I have changed my system to use the usbserial driver instead of the cdc-acm driver. I appear to be seeing traffic flowing, but I need to program something meaningful on the XPlained board to test this properly.

Here's what I did - Using Ubuntu.

First off, we need to blacklist the cdc-acm driver.

Edit /etc/modprobe.d/blacklist-local.conf
and add this line:
blacklist cdc_acm

(Note the inconsistent use of dash - and underscore _, the modprobe utility set is agnostic about this and they are interchangeable for some strange reason)

Now you may need to regenerate the initial ram disk so the blacklist is in effect during boot up as well as during normal operation.

This command should work for the current loaded kernel.

update-initramfs -k `uname -r` -u

(The quotes are the reversed ones, not the normal single quotes)

REBOOT

Now force the usbserial module to recognise your AVR device by passing the manufacturer and device id on the command line during the load.

modprobe usbserial vendor=0x03eb product=0x2122

You can get the vendor and product ids by running lsusb. The ones above relate to an XMega A1 XPlained board.

NOTE: These must be run as root, and may have side effects YMMV, backup etc first.

The steps should be similar for other versions of Linux, but I don't have anything else to hand right now.

I'm not sure how fully this fixes things, please report what you find, and also try the DFU/FLIP etc utilities down the line.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@ edekock

Following your instructions, I've got a writable /dev/ttyUSB0 now, When I open a serial terminal application and type, the LED on the board is blinking.

As the Linux Version of Flip (3.2.1) keeps crashin on loading the proper config XML file, I tried using the Windows Executable (3.2.4) with wine.

I made a softlink from /dev/ttyUSB0 to ~/.wine/dosdevices/COM1
and A valid COM-port did indeed show up in the windows-flip.

As a response to a connection attempt, the board-LED is flashing, but flip reports a timeout error.

also dmseg gives me the following:

[  140.760339] usb 6-1: new full speed USB device using uhci_hcd and address 5
[  140.945692] usbserial_generic 6-1:1.0: Generic device with no bulk out, not allowed.
[  140.945713] usbserial_generic: probe of 6-1:1.0 failed with error -5
[  140.945827] usbserial_generic 6-1:1.1: generic converter detected
[  140.946014] usb 6-1: generic converter now attached to ttyUSB0

Thanks anyway for getting my board blinking on command, it caused me a brief state of mild satisfation :D

*** Update

I can use Flip 3.2.4 on a Windows machine to flash the ATxmega128 on the Xplained board.

I got the very same Flip running on a WinXP VirtualBox, with the virtual COM1-Port connected to the Host's /dev/ttyUSB0.

It produces the very same timeout error as before with wine. I guess that means that the virtual com port solution by edecock is still faulty :(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@edekock

WOW!!

I rmmode the cdc_acm module, and modprobe usbserial with PID/VID as you described!
The AVR32 worked!

I type a string to xplained port, and watch the J4-Pin3, which is the xmega bootloader RX pin, by a standard USB-TTL hardware, the string is OK!!

====
i'm trying the damn "BatchISP", provided by Atmel. seems other error.

Quote:
./batchisp3.sh -device ATXMEGA128A1 -hardware RS232 -port /dev/ttyS0 -baudrate 115200 -operation ONFAIL abort MEMORY FLASH ERASE f BLANKCHECK LOADBUFFER ~/enterprises/xmega/test/main.hex PROGRAM VERIFY START RESET 0
=====================================================
JAVA_HOME = /usr/lib/jvm/ia32-java-6-sun-1.6.0.26/jre
=====================================================
LD_LIBRARY_PATH = /home/marco/document/Chips_datasheet/AVR/xplained/flip/flip.3.2.1/bin:/usr/lib/jvm/ia32-java-6-sun-1.6.0.26/jre/lib/i386/client:
=====================================================
PATH = /home/marco/document/Chips_datasheet/AVR/xplained/flip/flip.3.2.1/bin:/home/marco/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/opt/apache-ant-1.8.1/bin:/home/marco/enterprises/nios2-linux/toolchain-mmu/x86-linux2/bin:/home/marco/bin/:/usr/local/cuda/bin:/opt/msp430-gcc-4.4.4/bin:/opt/arm-none-eabi/bin:/opt/altera10.1.sp1/nios2eds/bin/nios2-gnutools/H-i686-pc-linux-gnu/bin/:/opt/altera10.1.sp1/nios2eds/bin/:/opt/altera10.1.sp1/quartus/bin/:/opt/altera10.1.sp1/nios2eds/sdk2/bin/:/opt/altera10.1.sp1/quartus/sopc_builder/bin:/home/marco/est_works/proj/concentrator/buildroot/output/host/usr/bin:/opt/avr32-gnu-toolchain-linux_x86_64/bin:/opt/TI/xdctools_3_20_07_86:/opt/TI/TI_CGT_C5500_4.3.8/bin:/usr/brlcad/bin
=====================================================
= start batchisp
=====================================================
Device does not exist.
ISP done.

=====================================================
= end batchisp
=====================================================

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
"-port /dev/ttyS0"

Shouldn't this be ttyUSB0 ?

Also I know batchisp/flip do require a special XML file to be loaded for the XMega128. I'm sure I saw something in the forum about that.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

edekock wrote:
Quote:
"-port /dev/ttyS0"

Shouldn't this be ttyUSB0 ?

Also I know batchisp/flip do require a special XML file to be loaded for the XMega128. I'm sure I saw something in the forum about that.

yeah, i made a softlink from ttyUSB0 to ttyS0.

use ttyUSB0, the same error

./batchisp3 -device ATXMEGA128A1 -hardware RS232 -port /dev/ttyS0 -baudrate 115200 -operation ONFAIL abort MEMORY FLASH ERASE f BLANKCHECK LOADBUFFER ~/enterprises/xmega/test/main.hex PROGRAM VERIFY START RESET 0
Device does not exist.
ISP done.

do you know the protocol of batchISP ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't, but take a look at http://dfu-programmer.sourceforg... which is supposed to be an open replacement for flip.

Euan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also look at http://www.atmel.com/dyn/resourc... for the DFU specification.

Euan.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, I know dfu-programmer from sf.net, I can run it to re-programming the AVR32 on my xpalined.(but i have no a idea on AVR32)

DFU is for the AVR device(like uc3/ at90usb..) which has USB port and use usb as bootloader bus..

I mean the protocol on the serial port which running on XMEGA128A1.

====

well I did the following test on xplained:

    1,I pushed SW0 and pluged into usb, the xmega128a1 running into its bootloader mode, and in linux, i got a /dev/ttyUSB0 (connected to AVR32 uart-bridge) 2,When I type something to /dev/ttyUSB0, the xmega128a1 relights its LEDs like the power on without SW0 pushed. So I think I break the bootloader protocol, then xmega128a1 goto user application code.
    3,and sometimes, when I break the bootloader mode, I can see several char on /dev/ttyUSB0 terminal

So, I think the avr32 uart-bridge worked! (by force use usbserial driver)

the KEY is the bootloader protocol, or someone give the correct parameters of batchISP

GO ON!!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

anybody make progress more?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am struggling to even program my XPlained right now - I can program/verify it from avrdude/JTAG (or PDI if I change the Fuse bits) and it all writes/verifies, but I am not seeing it run at all, I cannot even turn on an LED ;-(

It's all very strange as the program cycle works and the fuse bits definitely active PDI/disable JTAG on demand.

I'm just trying to code a simple Send/Receive serial loop on the XMega chip, this will allow me to verify that the USB ACM Serial implementation is working on the AVR32 chip as it should just pass through the UART lines from the ATXMega.

Hopefully I'll get some time on it this weekend...

Euan.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I am usingl RHEL5.6 and the Xplain XMega-A1 X from Atmel. It originally showed up as ttyACM0, but didn't work. Then I followed instructions here and loaded usbserial, it shows up as ttyUSB0. I can open the port and write to it, but not able to read back. Any advise?

Thanks,
manda

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I give up....

I got a new xmega128a1 nakeboard and a AVRISP MKii(clone version)

worked very well like my ATmega tool chians did

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@chopin1998 I agree with you, I bought an XPlained board, and also got a 128A1 (Actually 64A1) on a DIP card so it plugs into my breadboard.

The XPlained has cost me huge amounts of wasted time - getting PDI working, trying to get TTY access working, trying to get a program to run, messing with FLIP/BatchISP/DFU etc. Now I cannot even get an LED to blink!

My breadboard device has just worked (in as far as the XMegas "work") I have full access to the whole IC, and it is properly programmable.

So for the second (or third) time I have decided to pack the XPlained board away again as it is just wasting my time and effort.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is just wasting my time and effort too, but I dont give

up!

Is there any progress in this case? Whats about Lufa

120219?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

120219?

19th February 2012 ;-)

Look under Downloads on this page:

http://www.fourwalledcubicle.com...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@clawson: thx for the tip. But the 120219 Project Changelog says only support for the Atmel XMEGA B1 Xplained board is added. There are a differences btw. the A1 and B1 board, I guess?!
If you use lufa 120219 with an A1 board actually, may I ask for more information?

best regards D.C.K

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

my reply seems to be very outdated but i still have the same problem as the very first posting of "arthurdent".
Got a new ATXmega128A1 xplain Rev.7 board and the ttyACM0 is present but not accessible.
Seems to block all apps which want to get access to this device.
I tried several udev-rules but this does not solve the problem.

Any idea highly welcome
thanks wally

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A recent LUFA support thread seems to indicate CDC-ACM is broken on Linux due to the over-zelous USB modem driver attaching in lieu of the cdc-acm one:

https://groups.google.com/group/...

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have used UC3A3256 with Centos, I have not faced any issues so far. May I know what does your lusub -v says and whether you have enuf permissions to access the serial port?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello

i'm working on OpenSuse 12.2, mostly with Arduino stuff. The Arduino UNO also connects to /dev/ttyACM0 without any problems.

I tried several udev-rules to make the 'xplai'
accesible, but not success so far.

[code]~>lsusb
Bus 001 Device 002: ID 05e3:070e Genesys Logic, Inc. USB 2.0 Card Reader
Bus 002 Device 004: ID 03eb:2122 Atmel Corp. XMEGA-A1 Explained evaluation kit
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

~>lsusb -v -d 03eb:2122

Bus 002 Device 004: ID 03eb:2122 Atmel Corp. XMEGA-A1 Explained evaluation kit
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x03eb Atmel Corp.
idProduct 0x2122 XMEGA-A1 Explained evaluation kit
bcdDevice 10.00
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 67
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 0
CDC Header:
bcdCDC 1.10
CDC Call Management:
bmCapabilities 0x03
call management
use DataInterface
bDataInterface 1
CDC ACM:
bmCapabilities 0x06
sends break
line coding and serial state
CDC Union:
bMasterInterface 0
bSlaveInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 255
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x72ca
(Bus Powered)
Remote Wakeup Enabled
Debug Mode
~>
~> dmesg
[29044.234053] usb 2-8: new full-speed USB device number 4 using ohci_hcd
[29044.435085] usb 2-8: New USB device found, idVendor=03eb, idProduct=2122
[29044.435096] usb 2-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[29044.435103] usb 2-8: Product: XPLAINED CDC
[29044.435108] usb 2-8: Manufacturer: ATMEL
[29044.435112] usb 2-8: SerialNumber: 056007010920
[29044.438258] cdc_acm 2-8:1.0: ttyACM0: USB ACM device
[29063.730739] SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=33:33:00:00:00:fb:88:c6:63:55:77:6f:86:dd SRC=fe80:0000:0000:0000:8ac6:63ff:fe55:776f DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=228 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=188
[29063.970671] SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=33:33:00:00:00:fb:88:c6:63:55:77:6f:86:dd SRC=fe80:0000:0000:0000:8ac6:63ff:fe55:776f DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=126 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=86
[29064.217128] SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=33:33:00:00:00:fb:88:c6:63:55:77:6f:86:dd SRC=fe80:0000:0000:0000:8ac6:63ff:fe55:776f DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=126 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=86
[29064.467321] SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=33:33:00:00:00:fb:88:c6:63:55:77:6f:86:dd SRC=fe80:0000:0000:0000:8ac6:63ff:fe55:776f DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=126 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=86
[29064.716500] SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=33:33:00:00:00:fb:88:c6:63:55:77:6f:86:dd SRC=fe80:0000:0000:0000:8ac6:63ff:fe55:776f DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=134 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=94
[29222.238302] SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=33:33:00:00:00:fb:88:c6:63:55:77:6f:86:dd SRC=fe80:0000:0000:0000:8ac6:63ff:fe55:776f DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=228 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=188
[29222.379660] SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=33:33:00:00:00:fb:88:c6:63:55:77:6f:86:dd SRC=fe80:0000:0000:0000:8ac6:63ff:fe55:776f DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=126 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=86
[29222.633164] SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=33:33:00:00:00:fb:88:c6:63:55:77:6f:86:dd SRC=fe80:0000:0000:0000:8ac6:63ff:fe55:776f DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=126 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=86
[29222.880456] SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=33:33:00:00:00:fb:88:c6:63:55:77:6f:86:dd SRC=fe80:0000:0000:0000:8ac6:63ff:fe55:776f DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=126 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=86
[29223.132763] SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=33:33:00:00:00:fb:88:c6:63:55:77:6f:86:dd SRC=fe80:0000:0000:0000:8ac6:63ff:fe55:776f DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=134 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=94
[29253.274214] SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=33:33:00:00:00:fb:88:c6:63:55:77:6f:86:dd SRC=fe80:0000:0000:0000:8ac6:63ff:fe55:776f DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=228 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=188
[29318.484140] SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC= SRC=fe80:0000:0000:0000:be5f:f4ff:fe05:49b5 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=84 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=44
[29355.182450] usb 2-8: USB disconnect, device number 4
~>

regards wally

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Let us do it step by step then!
--> First let us get the USB CDC working well in Windows (and thus making sure that there is no problem with the firmware)
Ah!! No, I am not interested in fighting whether Windows or Linux is good. (It is known that Windows CDC is not awesome but well, it is working!
--> If it is working, then we have the issue with the OS and not with Xplained board. Then try doing the serial port access as "root"..

I dont know whether it is the classical way of debugging things, but still ... ;)

and btw the lsusb -v doesnt throw up anything alarming by the looks of it atleast...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh wait hold on - is this the preloaded code that was already on the kit, or a fresh copy compiled from a recent(ish) ASF release? If the former there is a known Linux bug, and you will need to recompile and program the CDC demo in from Atmel Studio for it to work.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for the hints.

Yes it is still the original Botloader and the Demo on it. To make the working bootloader (i think doc:AVR1927) from the asf i need AVR32_gcc and i had problems to install on my distro. Maybbe i should try to build this bootloader on a Windows machine first. I hope it doesn't matter on which system the build was done. You see i'm beginner on all this stuff.

regards wally

PS: Maybe there is a ready made bootloader available and i can use Flip (windows) to upload it (?)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Maybe there is a ready made bootloader available and i can use Flip (windows) to upload it (?)

You cannot replace a bootloader with a bootloader. Use a PDI/JTAG programmer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

do you think/know i can use AVRISP MKII and a special cable from 2x3 pin (isp) to 2x5 pin (jtag) connector and programm the bootloader via PDI ?
If yes, which bootloader should i use to be able to acces the board via USB later ?

regarsd wally

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,
i managed to make AVRISP-MKII working via PDI and can flash programs using AVRStudio6.
I tried to burn the bootloader from AVR:1927
http://www.atmel.com/images/doc8372.pdf
and here:
http://www.atmel.com/Images/AVR1927_XMEGA-A1_Xplained_Example_Applications.zip

Error output from AVRStudio 6:

Timestamp:	2013-02-06 08:45:19.640
Severity:		ERROR
ComponentId:	20000
StatusCode:	0

Verifying Flash...Failed! address=0x21200 expected=0x17 actual=0xff

main goal of my efforts is to use "Xmegaduino IDE" and do all the stuff on Linux.

https://github.com/akafugu/Xmegaduino/downloads

Using the bootloader provided by Xmegaduino project, returns this error:

Timestamp:	2013-02-06 09:05:55.734
Severity:		ERROR
ComponentId:	20000
StatusCode:	0

Verifying Flash...Failed! address=0x20a00 expected=0x12 actual=0xff

if i would be able to upload programms/skeetches using avrdude and /dev/ttyACM0 would be nice also.

Any idea highly welcome, thanks
wally

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,
i fear i messed up all my stuff successfully now and want to try LUFA now.
Main problem is, that some docs are contradictory.
My hardware is:
xplain board with ATxmega128A1 and AT32UC3B1256 Rev.7
(VID:03eb PID:2122)
and i'm working on a Linux machine.
I do have an AVRISP-MKII and a diy-cable to connect from 6 pin to 10 pin on the board
to use PDI mode.

Seems this cable is ok, because i was able to program some firmware examples in the past.
In future i want to use modified Arduino IDE with lufa-support to devel my apps.

https://github.com/akafugu/Xmega...

Now i need some help for the first steps again
to bring up a working bootloader to access the board without any hardware programmer in
future directly through the USB.

Is there a step by step beginners doc to setup LUFA on my hardware ?

thanks wally

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
having struggled in reprogramming the bootloader back to my XMEGA-A1 Xplained board I found what seems to be a bug in the AVR Isp MKii firmware / Atmel Studio 6.0 and 6.1 BETA:

If I try to flash the atxmega128a1_batchisp_uart_bootloader.hex supplied in the zip accompanying AVR1927 I get the following message:

Verifying Flash...Failed! address=0x21200 expected=0x17 actual=0xff

Having tried I suddenly found out that if the hex file doesn't end on an even page boundary the programmer just seems to stop without flashing the last and partially finished memory page.

If I manually pad the hex file to an even page boundary I can verify correctly.

Seems to affect boot memory and PDI-programming, don't know about the other memory areas/protocols.
Both Atmel Studio 6.0 and AS 6.1 BETA and having upgraded AVR Isp MKii firmware to latest version.

(I have reported this to avrbeta at atmel dot com.)

Regards,

/Manni