Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different response time of ICM20948 #139

Open
Zzx-J opened this issue Jan 30, 2024 · 2 comments
Open

Different response time of ICM20948 #139

Zzx-J opened this issue Jan 30, 2024 · 2 comments

Comments

@Zzx-J
Copy link

Zzx-J commented Jan 30, 2024

Hi,

I have serveral ICM20948 and i am using them with the DMP interrupt on to get 9-axis quaternions.

I have found that the response time of the IMU are different. i.e. when doing the same movement, there would be a lag of the output for some of the IMUs. Is that normal?

I have upload the same code for each imu, the sampling frequency, ODR of the IMUs should be the same. Additionally i have tried different ODRs but still there are lags in response for some of the IMUs. I have also checked the data output frequency, again, they are same as expected.

Anybody help please?

@PaulZC
Copy link
Contributor

PaulZC commented Jan 30, 2024

Hi @Zzx-J ,

I can't help you with this question. But I am happy to leave it open in case someone else can.

Best wishes,
Paul

@faxik
Copy link

faxik commented Apr 23, 2024

I'm experiencing the same. However, if I add some debug prints to the sketch, I see that the time inconsistency comes from the status sequence:

status=ICM_20948_Stat_FIFOMoreDataAvail
status=ICM_20948_Stat_FIFOIncompleteData
status=ICM_20948_Stat_FIFOIncompleteData
status=ICM_20948_Stat_FIFOIncompleteData
status=ICM_20948_Stat_FIFOIncompleteData
status=ICM_20948_Stat_FIFOIncompleteData
status=ICM_20948_Stat_FIFOIncompleteData```

This, in turn, comes from the lines (1253–2154) in ICM_20948_C.c:

```c++
    if (fifo_count < icm_20948_DMP_Quat9_Bytes)
      return ICM_20948_Stat_FIFOIncompleteData;

I believe this has something to do with the readout requests (I guess a misalignment in an earlier request or another corruption). Maybe the correct way to process is to clean the FIFO in such a case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants