2024-02-07 03:45 AM
Hello,
I am using ISM330DLC sensor for my application on Esp32. Data ready pin from esp32 and sensor is being used to check if values are avalaible on the sensor or not.
As per the Application note AN5125, Data ready pin should high for a while and then all data should be fetched properly.
But in my case when I set ODR to 6500 Hz for Accelerometer, data ready pin counting 6500 in a second, but accelerometer samples are only collected 900 in a second (which should be (6500*3) per second).
I am using init function from ISM330dlc library:
// Set accelerometer data rate to 416 Hz in high-performance mode
// Enable accelerometer data-ready interrupt on INT1
if (ISM330DLC_ACC_GYRO_W_LowPower_XL((void *)this, ISM330DLC_ACC_GYRO_LP_XL_DISABLED) != MEMS_SUCCESS) {
// Handle error
return ISM330DLC_STATUS_ERROR;
}
if (ISM330DLC_ACC_GYRO_W_INT2_ON_INT1((void *)this, ISM330DLC_ACC_GYRO_INT2_ON_INT1_ENABLED) != MEMS_SUCCESS) {
// Handle error
return ISM330DLC_STATUS_ERROR;
}
if (ISM330DLC_ACC_GYRO_W_DRDY_XL_on_INT1((void *)this, ISM330DLC_ACC_GYRO_INT1_DRDY_XL_ENABLED) != MEMS_SUCCESS) {
// Handle error
return ISM330DLC_STATUS_ERROR;
}
if (ISM330DLC_ACC_GYRO_W_DRDY_PULSE((void *)this, ISM330DLC_ACC_GYRO_DRDY_PULSE) != MEMS_SUCCESS) {
// Handle error
return ISM330DLC_STATUS_ERROR;
}
I am unable to figure out that which register to use so that more data can be accumulated in a second (such as for 6500 Hz ODR, accelerometer data should be 18000 samples per second).
Assistance will be highly appreciated.