ICM 20948 Sample frequency

Hello,

This is Bruce from the University of Pennsylvania. I have started research with ICM 20948. Right now, we are using an interrupt to get each rising signal but we are unable to change the sampling frequency, it is currently around 92Hz, and it is not very stable. I wonder if I can set its register so that I can change the sampling frequency of the device? Or is there any other human motion tracking imu sensor that you recommend?

Thank you, I really appreciate it.

Sincerely,

Bruce

Hi Bruce.

The [data sheet has the information you’re looking for starting on page 11. Keep in mind those are the data rates for the sensors inside the chip but our library might not be optimized to get the highest speeds for retrieving data. We haven’t tested these to the limit so I can’t say what would happen, but if you need to go really fast, you’re probably going to want to connect these via SPI rather than I2C. The SPI bus is much faster than I2C.](https://invensense.tdk.com/wp-content/uploads/2016/06/DS-000189-ICM-20948-v1.3.pdf)

Hello TS-Chris,

Thank you so much for helping me with it, I have been struggling with this for days. Just to clarify, do you mean the information under section “OUTPUT DATA RATE”?

And can you give a more detailed answer about how can I set the rate in between the min and max value based on the Sparkfun library?

Thank you, I appreciate it.

do you mean the information under section “OUTPUT DATA RATE”?

Yes, that's the spot. :-) That tells how fast the hardware inside the chip can go.

can you give a more detailed answer about how can I set the rate in between the min and max value based on the Sparkfun library?

Sadly, no. The library is not designed to have the speed changed. You'd need to reverse engineer the code and modify it to speed things up. Unfortunately we can not assist you with that.

Hi - I just want to chime in here.

At the bare minimum the library has the capability to [access any register within the ICM-20948. That means that anything you are allowed to configure within the silicon is accessible. (Even if there is not a dedicated function to changing it)

However - I wonder if there may be a dedicated function: See here: [ICM-20948 setSampleRate function (I’d recommend checking out what register(s) that function writes to and comparing with the [datasheet to see if it does what you need).

If I remember correctly there may be some strange inter-dependencies on the sample rates of the various sensors. For that all I can recommend is a careful read-through of the datasheet.

Good luck! Let us know if you find any problems or anything else interesting. Thanks](https://cdn.sparkfun.com/assets/7/f/e/c/d/DS-000189-ICM-20948-v1.3.pdf)](SparkFun_ICM-20948_ArduinoLibrary/src/ICM_20948.h at 4d5f843753ec01c0c16484c97b6d7b6e459d260d · sparkfun/SparkFun_ICM-20948_ArduinoLibrary · GitHub)](SparkFun_ICM-20948_ArduinoLibrary/src/ICM_20948.cpp at 4d5f843753ec01c0c16484c97b6d7b6e459d260d · sparkfun/SparkFun_ICM-20948_ArduinoLibrary · GitHub)