AnsweredAssumed Answered

ADXL 362 Water Mark interrupt unable to map over INT2 pin

Question asked by ANK@123 on Jan 28, 2017
Latest reply on Mar 19, 2018 by jwang

HI,

 

I am working on interfacing ADXL362 to NRF52. I am trying to use FIFO of ADXL362. But I am facing some issues may be I am not clear with the concepts of FIFO. I have initialized the ADXL registers as follows

 

write(&spi,0x28,0x02); //FIFO control register - Stream mode,AH=0,Tempt enable =0
write(&spi,0x29,0x$A); //FIFO Sample Register - (25*3-1)
write(&spi,0x2B,0x04); //Watermark interrupt enable and Active low INT2 pin
write(&spi,0x2C,0x01); //Filter control register sets ODR=25Hz
write(&spi,0x2D,0x02);

 

As per the configuration, my sampling frequency is 25sps i.e. my FIFO count should be (25*3-1)(If I am not wrong). I need 25 samples in one second and hence according to me watermark interrupt should be generated only after 1 second. Also as I am mapping this interrupt over INT2 pin, I should get high to low pulse over INT2 pin for watermark interrupt.

 

In main code I am checking status register every time(as watermark interrupt not generated over INT2 pin) as follows.

 

for (;;)
{
      if(SPI1_init_flag==true)
      {
             memset(m_rx_buf, 0, m_length);
            spi_xfer_done = false;

            byteread = read_byte(&spi,0x0B);
            if((byteread & 0x04) == 0x04)
            {
               read_ADXL_FIFO(&spi);
              byteread = 0x00;

               printf("Watermark int\r\n");
            }
      }
power_manage();
}

 

What could be the solution to this? Has anyone already faced this issue?

Outcomes