BMI270 Axis Remap for "Wrist jiggle/shake"

Hi,

I've got the wrist jiggle/shake feature working succesfully on the BMI270, however I noticed that it only seems to detect the gesture when the device is upright, ie the Z axis of the chip is facing up. So rotating the chip onto it's side (X axis lines up with gravity) and performing the same gesture, it does not trigger. I saw this behaviour but I could not find much about it in documentation.

That's fine but I would like to swap the axis so that the gesture works when the X axis is pointing up with gravity as the chip is oriented like this in our design.

I tried to modify the GEN_SET_1 features register but when I do this, the gesture no longer works, and also the internal status register does not log any issues with axis remapping. here is a snippet from my driver when I am trying to remap the axis after initiatlizing the feature:

ret = i2c_reg_write_byte_dt(&i2c_, BMI270_FEAT_PAGE_ADDR, BMI2_PAGE_1);

// Mapping: X->Z , Y->Y, Z->X
wr16 = (0x02 << 0) | (0x01 << 3) | (0x00 < 6) | (0x01 << 9);
ret = i2c_burst_write_dt(&i2c_, BMI270_FEATURES_REG_ADDR + BMI270_AXIS_MAP_STRT_ADDR, (uint8_t *)&wr16, 2);

// Check INTERNAL_STATUS for invalid axis remap error?
ret = i2c_reg_read_byte_dt(&i2c_, BMI270_INTERNAL_STATUS_ADDR, &val_read);
LOG_DBG("Internal status 0x%x", val_read);
if (val_read != 0x01)
LOG_ERR("axes remap error");
{
}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 reply