PX4 ICM20948_I2C (not passthrough)

Hello everyone. I had a need to work with icm 20948 over i2c, fully reading accelerometer and gyroscope data. Based on the ICM20948 SPI and MPU 9250 I2C drivers, I wrote my ICM20948 I2C driver. But now it is not working properly. A large number of FIFO buffer overflow events occur, ac and gyro readings are given as if by accident. As I understand it, this is due to the fact that i2c takes data from FIFO much slower than SPI.
I tried changing the values of FIFO_SAMPLE_DT, GYRO_RATE, and ACCEL_RATE.
If you do this FIFO_SAMPLE_DT{1e6f / 18000.f};
The readings are much more stable, even the AHRS starts working, but it still shows that the flight controller is constantly rotating.
Can someone give me a hint on how to finish my driver?
Perhaps you need to set more special parameter values
IMU_GYRO_RATE MAX and IMU_INTEG_RATE?
I don’t really understand how it affects working with IMU.