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

BMI220 firmware support #357

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

barryblueice
Copy link

@barryblueice barryblueice commented Nov 1, 2024

I bought some cheap BMI270 for personal built SlimeVR Case by myself from a seller from Chinese AliExpress Market, the seller claim that these sensors are BMI270:

e270dce8cdefd160e8726771a7a291f0

But when I solder the sensor on, the SlimeVR tracker detect the sensor reg is 0x26 (BMI270 is 0x24):

image

After searching from google, I found a similar post on the bosch forum: BMI270 CHIP ID reported as 0x26 instead of 0x24, someone found that 0x26 is actually BMI220:

image

So I decided to try to adapt the BMI220 for the tracker. Unfortunately, I can't find any information about the source code about the BMI220. But I found the firmware successfully finally from coreboot/chrome-ec, than I try to modified the relatived source code which based on BMI270, now it can work.

VID20241101230625

However, there may still be bugs, so use them with caution.

The usage should be the same as BMI270/BMI160.

Attention
According from my friends, There is no difference between the BMI270 and BMI220 from the appearance and the sensors marking, and the sensor type can only be determined from the reg code after the sensor is soldered on the PCB.

src/consts.h Outdated
@@ -37,6 +37,7 @@ enum class ImuID {
BMI160,
ICM20948,
ICM42688,
BMI220,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put new sensor at the end, regardless of alphabetical order, server expects particular ID.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for interrupting, I will change it later

}

void motionlessCalibration(MotionlessCalibrationData &gyroSensitivity)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you check if advanced stuff like CRT really works (non-zero values returned, unique for each sensor?)

Copy link
Author

@barryblueice barryblueice Nov 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to serial console, it seems like excepting for CRT, other function can work normally.
The CRT function returned all-zero values.
I don't have any source code or datasheet related to BMI220. So I don't know how to modified the CRT function in order to make it work, also I don't know if this is a normal value😂.

image

image

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

Successfully merging this pull request may close these issues.

2 participants