Why is the LIS3DH set to an operational mode that is 'not allowed' in datasheet?

edited April 2019 in Cyton
In Table 10 of the LIS3DH datasheet, it states that CTRL_REG1[3] (LPen) = 1 and CTRL_REG4[3] (HR) = 1 is not allowed.

Checking the CTRL_REG1 and CTRL_REG4 LIS3DH registers from a properly functioning Cyton board shows that this is exactly how the LIS3DH is set via the Cyton.

CTRL_REG1 (0x20) = 0x08:
  • ODR3 = 0
  • ODR2 = 0
  • ORD1 = 0
  • ODR0 = 0
  • LPen = 1
  • Zen = 0
  • Yen = 0
  • Xen = 0
CTRL_REG4 (0x23) = 0x18:
  • BDU = 0
  • BLE = 0
  • FS1 = 0
  • FS0 = 1
  • HR = 1
  • ST1 = 0
  • ST0 = 0
  • SIM = 0
To confirm, I double-checked the OpenBCI_32bit_Library C++ file and header file, and they show:

#define SCALE_4G 0x10  //(b00010000) // +/- 4G sensitivity

void OpenBCI_32bit_Library::initialize_accel(byte g)
{
byte setting = g | 0x08;          // mask the g range for REG4
  pinMode(LIS3DH_DRDY, INPUT);      // setup dataReady interupt from accelerometer
  LIS3DH_write(TMP_CFG_REG, 0x00);  // DISable ADC inputs, enable temperature sensor
  LIS3DH_write(CTRL_REG1, 0x08);    // disable accel, low power mode
  LIS3DH_write(CTRL_REG2, 0x00);    // don't use the high pass filter
  LIS3DH_write(CTRL_REG3, 0x00);    // no interrupts yet
  LIS3DH_write(CTRL_REG4, setting); // set scale to g, high resolution
  LIS3DH_write(CTRL_REG5, 0x00);    // no boot, no fifo
  LIS3DH_write(CTRL_REG6, 0x00);
  LIS3DH_write(REFERENCE, 0x00);
  DRDYpinValue = lastDRDYpinValue = digitalRead(LIS3DH_DRDY); // take a reading to seed these variables
}

Any reason why this is and what actual operation mode is the accelerometer in? Would this affect the hex conversion to 'G' value?

Wondering if this would put the LIS3DH in some weird limbo mode that may or may not work all of the time.

Thanks

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Is your Cyton working with this setup currently?
  • edited April 2019
    Hi William,

    Yes, it seems that this setup is working as expected. I was just curious if there was a reason for choosing these settings as it appears to go against the datasheet.

    Thanks
  • wjcroftwjcroft Mount Shasta, CA
    Joel @biomurph or AJ @ajk might have some ideas. You can also PM them directly.  
Sign In or Register to comment.