Kirk, What bus are you using (SPI or I2C)? Both are "slow" buses which can sleep on you. In addition, are you using the FIFO?
Scheduling your reads and using a fast enough SPI setting along with the FIFO should let you acquire at 3.2KHz w/o drops. On Tuesday, August 02, 2016 15:17:02 Kirk wrote: > All, > > I'm working on a Beaglebone Black project using a MEMS accelerometer chip, > the ADXL312. > > The accelerometer has a pin which goes active each time a new data sample > is available to be read. > It runs at 3200 Hz. (about 1/3 of a ms per sample) > > The pin is connected to a GPIO input and I've written code to monitor this > pin and grab the data each time. > The sampling normally runs for several seconds continuously. > > The problem is, every once in a while Linux gets busy and apparently > interrupts my code and I miss samples. > (an overrun bit lets me know this is happening) > > > I'm looking for ideas on how to improve this so data samples are not missed. > > Any ideas? > > Kirk -- Hunyue Yau http://www.hy-research.com/ -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/4587031.UBqWJKisEK%40acer0. For more options, visit https://groups.google.com/d/optout.
