BMI270 - Calibration values not persistent in NVM after CRT

Hi,

I need to perform CRT on my BMI270 IMUs as they have significant gyro sensitivity errors.
Afterwards I want to store the value in the NVM memory.

Here is what I am doing:

- I do Gyro and Accel FOC using functions bmi2_perform_gyro_foc, and bmi2_perform_accel_foc
- I do CRT using bmi2_do_crt
- I attempt to store the values using the function bmi2_nvm_prog

The calibration sequences work, I can see the values stored in the Offsets registers and the gyro/accel output is significantly improved.

However, the bmi2_nvm_prog function seems to do nothing. After a POR, the Offset registers are all 0 again and I still the same gyro sensitivity errors.

Is there something I am missing? Is there another step I need to take to store and retrieve the values?

For reference, I've attached my code.

complete_calibration.zip
3.68KB

Best regards
Joel

5 replies