Information on timings...
Posted: Mon Feb 19, 2007 6:09 pm
Hi,
I have successfully set up my own USB device using an atmega8 and the latest avr-usb code. Only the 5V on the data lines made me some trouble, as the device would not work on 50% of the PCs I tried it on. Exchanging data with a Win32 user mode app using libusb works like a charm.
As I plan to additionally implement a software clock I wonder how critical the timings are in the various avr-usb parts. There doesn't seem to be much information on timings that have to be kept for avr-usb to work.
It seems to me that delays of up to 5 seconds in usbFunctionSetup() don't hurt at all. The libusb's usb_control_msg() call will simply block for that time.
However, would delays hurt in the main loop where usbPoll() is executed ?
How about an additional timer interrupt, would it interfere somehow with the usb hardware interrupt and mess up the timings there ?
(Is it necessary that the usb hardware interrupt is called as fast as possible or simply that this interrupt's code is accurate itself ?)
Thanks ,
watz
I have successfully set up my own USB device using an atmega8 and the latest avr-usb code. Only the 5V on the data lines made me some trouble, as the device would not work on 50% of the PCs I tried it on. Exchanging data with a Win32 user mode app using libusb works like a charm.
As I plan to additionally implement a software clock I wonder how critical the timings are in the various avr-usb parts. There doesn't seem to be much information on timings that have to be kept for avr-usb to work.
It seems to me that delays of up to 5 seconds in usbFunctionSetup() don't hurt at all. The libusb's usb_control_msg() call will simply block for that time.
However, would delays hurt in the main loop where usbPoll() is executed ?
How about an additional timer interrupt, would it interfere somehow with the usb hardware interrupt and mess up the timings there ?
(Is it necessary that the usb hardware interrupt is called as fast as possible or simply that this interrupt's code is accurate itself ?)
Thanks ,
watz