Hi, I'm using a USB Inertial Measurement Unit that theoretically produces data at 500Hz. According to the timestamps on the data, indeed the data is being produced at 500Hz. But I'm getting it in burst, with an "efective" sampling rate of 6ms instead of 2ms. That is, 166Hz instead of 500hz.
I'm running ubuntu 14.04. I tried modifying the priority of the thread, but nothing changed. The data is being read in polling mode. Every 2ms I try to read data from /dev/ttyACM0. A previous implementation was using the ioctl library to get the available data size, and after reaching a certain value the data was read. That code was going at 10Hz... I'm been trying to get my head around the polling rate of the usb driver, but all I find is related to USB's mouse polling rate. So I'm not sure how to apply that in my case. But it encourage me look further because it means that there may be a default usb polling rate somewhere! We are using USB 2.0 (if it matters), ubuntu 14.04, I'm reading at 166Hz using a standard file descriptor. But I need to get the data faster. 500Hz would be amazing. 250Hz ( 4ms polling rate) would be enough. The computer that will use the device (but I don't have access to all the time) has xenomai. Meaning very close to real time. But usually IO operations break the real time so this runs on a separate thread. I say this just in case is help full. Cheers. Jose Colmenares. Software Engineer. Dynamic Legged Systems, Advanced Robotics. Italian Institute of Technology. +39 010 717 818 18-- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html