Post Go back to editing

ADXL372 - Peak Detection and FIFO triggered mode?

Category: Software
Product Number: ADXL372


I'm trying to understand the peak detection feature in the ADXL372. In summary from what I understand:

  • Highest magnitude sample gets stored in MAXPEAK_x_x registers after an activity -> inactivity event happens

Now the datasheet says:

"Follow these steps to enable peak detection: 1. Configure the FIFO_CTL register for peak detect mode (b0011100X to Register 0x3A). 2. Set the desired activity threshold and time settings (Register 0x23 to Register 0x29). 3. Set the desired inactivity threshold and time settings (Register 0x2A to Register 0x31). 4. Set the activity mode to linked or loop mode (Register 0x3E)."

What I'm confused about, is why does the FIFO need to be configured for peak detection here? Does the latest peak detection value not go directly into the MAXPEAK_x_x registers? Or does it go the FIFO and then the MAXPEAK_x_x registers are reading from FIFO? 

Because let's say I want to also use the FIFO in triggered mode, after activity has been registered. Can't the peak detection maximum samples go straight to the MAXPEAK_x_x registers and be updated there whilst I use the FIFO in triggered mode to capture samples around the event?

Top Replies

  • Hi  ,

    We have recently updated the datasheet (RevC) to reflect your observation (in pages 21 and 22). FIFO is not needed to record me maximum peak.  

    ADXL372 (Rev. C) (

    I hope this helps, 


  • Hi Pablo,

    I was looking at revC when I wrote this question. On pages 21/22 it gives two examples on how to enable 'peak detection'. In both cases, it mentions configuring the FIFO as the first step:

    Hence my question. It seems the second example is referring to using the FIFO to store maximum peaks. But in the first example, I'm not sure why step 1 says to config the FIFO. So, can we confirm that the FIFO is definitely not needed in order to store maximum peaks? 

  • I've configured the sensor for peak detection, and seem to have it look like it's working.
    But your point about FIFO not being needed for peak detection, when reading MAXPEAK_x_x register can't be true, surely. Not only does the datasheet say FIFO needs to be configured,
    If I set FIFO_CTL to 0, the peak detection triggers, but the values read out are all 0. If I configure the FIFO_CTL for peak detect mode, it triggers, and the values read show some g reading.

    In this configuration, Is there a risk that the values read then may be misaligned due to the FIFO read/write pointer collision issue with the ADXL372? I need an absolute answer as our application MUST require the max peak values being on the correct axes. I'm using this peak detection as a workaround for the FIFO bug.


  • Hi  , 

    Are you reading the max peak values directly from the max peak registers? if so, the max peak detection happens in the analog domain and the max peak values are directly stored in the max peaks registers. No FIFO intervention. Please have into account the max peak function limitations, as described in the datasheet. 

    We provided a workaround for the FIFO misalignment in the datasheet as well. As long as you follow the recommended routine you should not have any issue. 



  • Hi Pdel,

    Sorry to revive this thread. I had to work on other stuff in the meantime. Just coming back to this issue.

    "the max peak detection happens in the analog domain and the max peak values are directly stored in the max peaks registers."

    That's what I thought, after reading the data sheet, but I cannot get any actual values that are not 0 from the peak detection registers, unless I configure 

    FIFO_FORMAT to 111 (store peak events) in FIFO_CTL register. Just like I mentioned in previous response.

    When I set FIFO_CTL reg to be all 0, the activity interrupt fires, I read max peak registers but all values are 0

    When I set FIFO_CTL reg to 0x38 (enable storing of peak events), the same happens, except the values are non-zero.

    I'm only reading from the maxpeak registers.

    Am I missing something here, or is the FIFO in fact, required somehow for peak detection. Maybe the max peak registers are tied to the FIFO somehow? If you could confirm that for me that would be great.