Nicla Sense ME Logging data at 800Hz

Hi There!

I am using a Nicla Sense ME to log ONLY accelerometer and gyroscope data at 800Hz (a little bit less is fine). I am using the Arduino IDE with the BHY2 library to achieve this. Eventually I am going to be storing the data on a SD card but for right now I just want to be able to print the timestamped data samples to the serial monitor to ensure they are recording at 800Hz.

I have a sketch working where it is able to print to serial at around ~398Hz when I don't write anything into the "accel.begin()" function, which is expected since it is supposed to default to 400Hz. However when In try to write "accel.begin(800)" to adjust the sampling rate, the outputted data still stays at ~400Hz!

It seems to me that there is a cap on the Nicla Sense ME when utilizing the BHY2 library. Is this true or is there something I am missing here?

I also thought about communicating to the BHI260AP registers directly using either I2C or SPI and configure them that way but whenever I try to do that, I don't get any data at all printed to the serial monitor.

Any help with either properly using the BHY2 library in Arduino IDE or figuring out how to properly write to the BHI260AP sensors directly and poll the data from FIFO at 800Hz would be greatly appreciated!

Thank you!

5 replies