When I access the inputs generated by the driver for the accelerometer I can only get less than 10 samples per second. Is there a way to sample faster than that through this method or do I need to access the device directly using the i2c bus? The platform is i.MX6QP.
Thanks!
Hello Jose,
You can access the device through I2C in order to change the Output Data Rate “ODR” (register CTRL_REG1) from 1.563 Hz to 800 Hz for each sensor or up to 400 Hz when in hybrid mode (both sensors active). Another way to improve the resolution of the data is through oversampling ”OSR” (register CTRL_REG2); the oversampling settings allow the end user to optimize the resolution versus power trade-off in a given application. More details can be found in the datasheet.
You may find useful the following application notes as well:
https://www.nxp.com/docs/en/application-note/AN4076.pdf
https://www.nxp.com/docs/en/application-note/AN4075.pdf
Have a great day,
Paulina
Thank you! I’ll try that…