GithubHelp home page GithubHelp logo

nonolith / usb-xmega Goto Github PK

View Code? Open in Web Editor NEW
38.0 10.0 13.0 529 KB

USB stack for Atmel ATxmega32A4U and related parts

Home Page: http://nonolithlabs.com

C++ 37.73% C 27.12% Python 23.11% Assembly 12.04%

usb-xmega's People

Contributors

itdaniher avatar kevinmehall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

usb-xmega's Issues

Device not recognized

Hi guys, i'am missing some config? In windows it says Unknown USB device(Device Descriptor Request failed) and in mac is not recognize also. Thank you in advance

Are you planning to provide a C++ version of the USB framework?

Hi,

I tested your usb-xmega stream example successfully with an ATXMega192A3U, so I decided to add more stuff to the AVR code and also to change the python code. So I added a new C++ class AD7606 (for an D/A converter), included the AD7606.h in the main file and added AD7606.cpp to the line saying "CPPSRC =" in the Makefile.

But to use the class in the main file I had to convert the main file and all its includes to C++ too. But before I go to work... Are you planning to provide a C++ version of the USB framework?

Bug in source?...

In the function CALLBACK_USB_GetDescriptor in the exsample you wrote:
const uint8_t DescriptorType = (wValue >> 8);
const uint8_t DescriptorNumber = (wValue & 0xFF);
are you sure?
I think it should look like this:
const uint8_t DescriptorType = (wValue >> 8);
const uint8_t DescriptorNumber = (wValue & 0xF);

Regards

Example for Xmega128A1 or Xmega128A3

I try to implement a usb communication between a xmega128A3 or xmega128A1 and my pc. But it don't work.
Could someone help me with a working example?

Thanks Martin

Sometimes I can not write to the device. Probably buffer full?

Hi there,

I am using this library for a project where I can read voltages on a AD and send it to python and vice versa. Actually I have the problem that python gives me a LIBUSB_ERROR, because it can not write to the device. This mostly happens after writing 1024 bytes to the ATXMega192A3U. But sometimes it works like a charm.

Sending bytes to the host makes no problem at all, only receiving bytes from the host. Currently I am using a very simple protocol to communicate with the XMega:

  • For sampling a voltage from the AD I simply write one byte 's' to the XMega. Then the XMega sends me first back the magic number 123, then a 8 (for 8 channels), and then 8 times 2 bytes.
  • For setting a new voltage on a channel C, I send first 't', then one byte C and then two bytes for the voltage.
  • For setting new voltages on all 4 output channels, I send first a 'u', then the number of channels N and then N times 2 bytes.

Maybe you can help me with developing the main loop which should always be able to receive the data that comes from the host? Or do you have an example framework for a simple protocol between Host and XMega?

Thank you in advance and best Regards,
Nicolas

Unable to Enumerate

Hello,

when trying to use the bootloader in this project I ran into a problem with a self-compiled binary.
The µC does not show up in lsusb and dmesg gives me the following:

[ 8276.726102] usb 2-4: new full-speed USB device number 43 using ohci-pci
[ 8277.134380] usb 2-4: device not accepting address 43, error -62
[ 8277.134413] hub 2-0:1.0: unable to enumerate USB device on port 4

I'm using the AVR8 Toolchain from Atmel with avr-gcc version (AVR_8_bit_GNU_Toolchain_3.4.3_1072) 4.8.1

It works using your given binary, but I have to change the I/O-Pins.

Greetings,
LittleFox94

CRC error

Hello nonolithlabs et al.,

I'm thoroughly impressed by this very slimmed down USB boot loader! I'm compiling it for ATxmega64a3u (works perfectly), programming it along with fuses—and I'm perfectly able to connect to using flash.py.

The problem is that I just can't make it accept my firmware: I get a CRC error. I've tried different APP_SECTION_PAGE_SIZEs (I'm always confused whether to use bytes or words), but that doesn't help.

Bootloader ID 9090bb01, version 1
Part ID: 1e964206 = ATxmega64A3U
Flash size: 65536 (256-byte pages)
Hardware: CEE Version: v2b
Loading input file panelboard_atxmega64a3u.hex
Size=36229; CRC=0xb07295
Erasing... done
Flashing... 100%
Checked CRC is 0x341ee1
CRC DOES NOT MATCH

(No, it's not a CEE board, I just haven't changed the name and version.)
I have a buzzer on the board, and I make it beep when the programming starts and when the CRC is requested—the two beeps are very close in time.
Nothing is programmed in the app. section; reading from the device gives me erased memory:

:10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00
:10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
:10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
:10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0
:10004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0
:10005000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0
....

I'm guessing there is a compatibility issue with the sp_driver.S—is there something obvious I've missed? Anyone else with similar problems?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.