Hello,
I have succeeded settıng the gyro and acceletometer offsets, by using USER PROGRAMMABLE OFFSET that is referenced in datasheet section 5.4.
The routine I created works but only before device bootup. If the device offsets are changed while the sensor is running, it is not taken into effect.
Namely, I have the following init procedure:
setDeviceOffsets(wx, wy, wz, ax, ay, az); // set device offsets to 0
bool accel_ok = setAccelODRAndFSR(ODR_100HZ, FSR_0); // set accel odr: 1Khz, fsr: ±16g
bool gyro_ok = setGyroODRAndFSR(ODR_100HZ, FSR_0); // set gyro, odr: 1Khz, fsr: ±2000dps
if(!(accel_ok & gyro_ok)) { nogo(); } // if parameter fail, nogo
startFIFOMode(); // start fifo mode
startTempMeasure(); // start temp measure
startGyroMeasure(LN_MODE); // start gyro, low-noise mode
startAccelMeasure(LN_MODE); // start accel, low-noise mode
I can adjust device offsets and it works just fine, but only if device offsets are written to the USER PROGRAMMABLE OFFSET.
Is there a way, or workwaround so we can change the device offsets while the sensor is operating?
Any ideas/recomendations/help greatly appreciated.
-C.A.
Hi,
Are you trying to transition from Low Noise mode to Low Power mode on the fly? Please take a look at the Section 12 and 14.36 (PWR_MGMT0).
Thank you,
I am trying to change gyro/accel offsets on the fly. It seem that section 12 has all the missing information I need.
Best Regards,
Can
Let us know if you have more questions.