Level Horizon, doesn't save trims

Hi!

I have received new CUAV Pixhack V3x board to change the bad one with inconsistent gyros, that made a crash earlier.

This board is good, but this time broblem with Accelerometer! ))

Please explain me. After accel calibration and making Level Horizon everithing is good. Than reboot the board and no level again. AHRS_TRIM_X and AHRS_TRIM_Y are not saved after reboot and rewrited to old values.

X: 0,02073795 —> 0,03572443
Y: 0,005233819 —> -0,1337404

Everytime the same. Left values after Level procedure rewrite to right values after reboot.

Level is like this every time:

I found out, that not only trims are not saved, but all the accel calibration.

For example. I switched off IMU3 by INS_ENABLE_MASK = 3

After that I make 3d Accel Calibration. Before reboot everithing is OK, even Level horizon not needed, it’s fine.

The params look like this:

INS_ACC_BODYFIX,2
INS_ACC_ID,1245474
INS_ACC2_ID,1114914
INS_ACC2OFFS_X,0.06415558
INS_ACC2OFFS_Y,0.1445052
INS_ACC2OFFS_Z,0.430906
INS_ACC2SCAL_X,1.005838
INS_ACC2SCAL_Y,1.02247
INS_ACC2SCAL_Z,1.004611
INS_ACC3_ID,0
INS_ACC3OFFS_X,0
INS_ACC3OFFS_Y,0
INS_ACC3OFFS_Z,0
INS_ACC3SCAL_X,0
INS_ACC3SCAL_Y,0
INS_ACC3SCAL_Z,0
INS_ACCEL_FILTER,20
INS_ACCOFFS_X,-0.01419845
INS_ACCOFFS_Y,-0.117505
INS_ACCOFFS_Z,-0.7051432
INS_ACCSCAL_X,0.9982268
INS_ACCSCAL_Y,1.001589
INS_ACCSCAL_Z,0.9838302
INS_ENABLE_MASK,3
INS_FAST_SAMPLE,1

But after reboot all the values are reset to something default… I don’t know where they are taken from.

INS_ACC_BODYFIX,2
INS_ACC_ID,1245474
INS_ACC2_ID,1114914
INS_ACC2OFFS_X,0.04548042
INS_ACC2OFFS_Y,0.1989773
INS_ACC2OFFS_Z,0.3003213
INS_ACC2SCAL_X,1.008412
INS_ACC2SCAL_Y,1.024767
INS_ACC2SCAL_Z,1.004836
INS_ACC3_ID,0
INS_ACC3OFFS_X,0.1502439
INS_ACC3OFFS_Y,0.1565984
INS_ACC3OFFS_Z,0.7551795
INS_ACC3SCAL_X,1.003478
INS_ACC3SCAL_Y,0.9943347
INS_ACC3SCAL_Z,0.9876083
INS_ACCEL_FILTER,20
INS_ACCOFFS_X,-0.01419845
INS_ACCOFFS_Y,-0.117505
INS_ACCOFFS_Z,-0.7051432
INS_ACCSCAL_X,0.9982268
INS_ACCSCAL_Y,1.001589
INS_ACCSCAL_Z,0.9838302
INS_ENABLE_MASK,3
INS_FAST_SAMPLE,1

How can it be solved? Why all the calibration reset?

UPD. Oh, it seems, that only IMU2 and IMU3 resets. I will try to use only IMU1.

Only IMU1 is not possible to use, because it rewrite agian values for ACC2 and ACC3 calibration and the message PreArm: 3D calibration is neede appears. AHRS_TRIMS are also rewrited and no level horizon.

Problem solved!

Reset to default settings, than calibrating accels… few reboots - no problem. Than uploading parameter list excluding INS_ACC parameters. Works fine.