ADXL375: FIFO in Trigger Mode with No Readings Near Threshold

Hi everyone,

I'm trying to use an ADXL375 with its FIFO in trigger mode for a single shock, which causes the INT2 pin of the 375 to go high:

set(0x2C, 0x0F);
set(0x2D, 0x0); // turn off while we configure
set(0x31, 0x0B);
set(0x1D, 0x2C); // SingleShock threshold around 34g
set(0x21, 0x50);
set(0x22, 0); // disable Double Shock
set(0x23, 0);
set(0x2A, 0x0F);
set(0x2E, 0x40); // enable SingleShock interrupt
set(0x2F, 0x40); // ... on INT2
set(0x38, 0xCF); // trigger mode FIFO
set(0x2D, 0x08); // turn on

(set() is a function I used to send single bytes to the registers on the 375).

Once the INT2 Pin goes high, I do a read on 0x39 and the appropriate masking of bits to get the number of readings in the FIFO and then read them all in as multi-byte reads as per the documentation and multiple by 0.049 to get the value in g's.

I'm noticing that the FIFO often contains readings nowhere near the order of magnitude of the threshold value (in this case 0x2C).

I was hoping someone here could offer pointers about what I'm potentially missing?



Formatting changes
[edited by: vlchung at 10:18 AM (GMT -4) on 1 Jun 2021]
Parents
  • Hi 

    I suspect that the reason is because the Trigger bit on FIFO_CTL register ,(0x38), is set to 0.

    From the datasheet: "A value of 0 in the trigger bit links the trigger event of trigger mode to the INT1 pin, and a value of 1 links the trigger event to the INT2 pin." 

    So as a first measure I would do: 

    set (0x38, 0xEF); 

    since you mapped the single shock interrupt to INT2 pin. 

    I hope this helps,

    Pablo. 

  • Hi Pablo,

    Yep thanks Pablo, that does help. In the interests of people searching through the forums later:

    1. I had misinterpreted the role of the Trigger Bit, which I now understand to mean "which INT will the trigger the FIFO", not "which INT the FIFO will trigger when the FIFO enters Trigger Mode"
    2. The documentation goes on further to say that if you want to continue monitoring the device for more triggers, you need to put the FIFO into bypass mode before returning it to Trigger mode. Or to use my earlier code, to reset the device to listen for the next shock:
      set(0x38, 0x00);
      set(0x38, 0xEF);
    3. I needed to wait a small amount of time between the INT occurring and reading in the contents of the FIFO. Given I'm running this on an Arduino-based core, I inserted a delay(100) which was more than enough
    4. I'm getting intermittent noise above the -/+200g range of the device. Once I screened those out, the readings seem to be OK

  • Hi , I am glad that it worked! let me know if you have any more questions. 

    Pablo. 

Reply Children
No Data