Skip to main content
Visitor II
March 26, 2019
Question

IIS2DH - 12-bit Resolution

  • March 26, 2019
  • 4 replies
  • 923 views

Hi,

I can only seem to read 10bit resolution despite setting the following:

REG_CTRL1 = 0b00000111;

REG_CTRL4 = 0b00001000;

I have low power mode disabled and HR mode enabled, but the precision does not increase from Normal Mode.

Am I missing something?

    This topic has been closed for replies.

    4 replies

    ST Employee
    March 27, 2019

    Hi, it should work.. Could you share e.g. the OUT_X_L (28h) and OUT_X_H (29h) values? do you concatenate it in the right way? Please consider that the sens is 3.91 mg/digit for NM and for 0.98 mg/digit in case of HR mode

    iaeinfachAuthor
    Visitor II
    March 27, 2019

    Here is the output of a resting module @ 2G / 25Hz ODR. I am reading values from the FIFO queue. I am triggering the read at the watermark level of 28.

    High Res Mode

    REG_CTRL1 = 0b00000111;

    REG_CTRL4 = 0b00001000;

    [98195] OUT_X_LH 00 80

    [98214] OUT_X_LH 06 C0

    [98236] OUT_X_LH 0C C0

    [98257] OUT_X_LH 12 80

    [98278] OUT_X_LH 18 C0

    [98299] OUT_X_LH 1E 00

    [98320] OUT_X_LH 24 00

    [98342] OUT_X_LH 2A C0

    [98363] OUT_X_LH 30 00

    [98384] OUT_X_LH 36 00

    [98405] OUT_X_LH 3C 00

    [98426] OUT_X_LH 42 C0

    [98448] OUT_X_LH 48 00

    [98469] OUT_X_LH 4E C0

    [98490] OUT_X_LH 54 00

    [98511] OUT_X_LH 5A 00

    [98532] OUT_X_LH 60 00

    [98554] OUT_X_LH 66 C0

    [98575] OUT_X_LH 6C 40

    [98596] OUT_X_LH 72 00

    [98617] OUT_X_LH 78 40

    [98638] OUT_X_LH 7E 40

    [98660] OUT_X_LH 84 00

    [98681] OUT_X_LH 8A 00

    [98702] OUT_X_LH 90 00

    [98723] OUT_X_LH 96 C0

    [98744] OUT_X_LH 9C C0

    [98766] OUT_X_LH A2 00

    Normal Mode

    REG_CTRL1 = 0b00000111;

    REG_CTRL4 = 0b00000000;

    [58168] OUT_X_LH 00 C0

    [58187] OUT_X_LH 06 40

    [58209] OUT_X_LH 0C C0

    [58230] OUT_X_LH 12 80

    [58251] OUT_X_LH 18 40

    [58272] OUT_X_LH 1E 80

    [58293] OUT_X_LH 24 80

    [58315] OUT_X_LH 2A 80

    [58336] OUT_X_LH 30 40

    [58357] OUT_X_LH 36 C0

    [58378] OUT_X_LH 3C 40

    [58399] OUT_X_LH 42 00

    [58421] OUT_X_LH 48 00

    [58442] OUT_X_LH 4E 80

    [58463] OUT_X_LH 54 80

    [58484] OUT_X_LH 5A 00

    [58505] OUT_X_LH 60 00

    [58526] OUT_X_LH 66 40

    [58548] OUT_X_LH 6C 40

    [58569] OUT_X_LH 72 00

    [58590] OUT_X_LH 78 80

    [58611] OUT_X_LH 7E 00

    [58633] OUT_X_LH 84 C0

    [58654] OUT_X_LH 8A 80

    [58675] OUT_X_LH 90 C0

    [58696] OUT_X_LH 96 40

    [58717] OUT_X_LH 9C C0

    [58739] OUT_X_LH A2 C0

    Am I not converting correctly?

    X = (int16_t)(i2c_read_data[i+1] << 8 | i2c_read_data[i]));

    iaeinfachAuthor
    Visitor II
    March 28, 2019

    Let me put it another way...

    In HR Mode I expect raw values to change by a factor of 16.

    In Normal Mode I expect raw values to change by a factor of 64.

    In LP Mode I expect raw values to change by a factor of 256.

    What I observe is the following:

    HR Mode: 64

    Normal Mode: 64

    LP Mode: 256

    So, I am not seeing 12-bit or at least there does not appear to be a difference between HR and Normal modes.

    iaeinfachAuthor
    Visitor II
    March 28, 2019

    So, now I see the issue. The FIFO only supports 10bit. Ugg.