The problem persists if the delay is 15 ms or greater, and disappear for lower values.
Any idea why?
System: Linux Ubuntu Mate 20.04
Arduino ide 1.8.13
Library: MPU9250 0.4.4 by Hideakitai
When you call the mpu.setup() function without settings, then it uses the default settings which sets the sample rate at 200Hz which is stored in the FIFO. You have to be fast enough to read the data from the FIFO.
I'm not happy with that library.
The "simple.ino" example has this loop() function:
We rectify our previous answer.
We managed to solve the problem changing the magnetometer data read parameter in the MPU9250.h file.
In detail, we simply changed the MAG_MODE parameter (line 85), setting it to 0x02 (default is 0x06).
With this change, the mpu.update() function returns reliable data even if called with an interval up to 200 ms, without freezing.