General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
-
iphi
- Rank 2
- Posts: 68
- Joined: Mon Jun 25, 2007 11:37 am
Post
by iphi » Fri Feb 15, 2008 2:29 pm
Hi,
my understanding is that usbSofCount should increment every millisecond.
Well, I tried this on my Easylogger hardware and I added a feature so I can read usbSofCount via USB.
I find that usbSofCount increments only very rarely, not even every second, sometimes more often depending on the USB traffic.
What am I doing wrong?
Regards, Thomas
-
christian
- Objective Development
- Posts: 1443
- Joined: Thu Nov 09, 2006 11:46 am
Post
by christian » Fri Feb 15, 2008 3:51 pm
In reality, usbSofCount increments on every interrupt which can't be interpreted as the start of a valid USB message. If you wire the interrupt to USB D+, this is roughly every Start Of Frame. Otherwise it's just garbage.