nonolith / USB-XMEGA

USB stack for Atmel ATxmega32A4U and related parts
http://nonolithlabs.com
38 stars 13 forks source link

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

Closed NicolasGoeddel closed 4 years ago

NicolasGoeddel commented 10 years ago

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:

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