AnsweredAssumed Answered

ADXL345 how to modify register value after first configuration

Question asked by Maurizio_IT on Feb 21, 2013
Latest reply on Feb 23, 2013 by neilzhao

Hello, I'm using ADXL345. I would like to change the data rate after first configuration when one mcu need more or less data streaming from FIFO. I try to put into standby mode  and modify the value but do not change.

What is the procedure to change data rate on fly?

This is my code:

.... running

ADXL345_SetRegisterValue(ADXL345_POWER_CTL, 0x0);     //set standby mode

ADXL345_SetRegisterValue(ADXL345_BW_RATE, newdatarate);     //set standby mode 0..10

ADXL345_SetRegisterValue(ADXL345_POWER_CTL, 0x8);     //set measure mode

.... data rate still unchanged

What is wrong?

Regards

Maurizio

Outcomes