AN092
© Kionix 2019 All Rights Reserved
11 July 2019
Page 7 of 27
-
Once a Buffer-Full Interrupt is issued on INT1 pin, acceleration data can then be read from
the Buffer Read (BUF_READ) register at address 0x63
in 2’s complement format. The data is
recorded in the following order: X_L, X_H, Y_L, Y_H, Z_L and Z_H (16-bit mode) with the
oldest data point read first as the buffer is in FIFO mode. The full buffer contains 258 bytes of
data, which corresponds to 43 unique acceleration data samples.
3.4.3.
Trigger Mode
This example configures enables the accelerometer to start filling sensor data to the internal
buffer. Prior to a trigger event, once the watermark setting is reached, old data will be
discarded and new data will be added. Following a trigger event, data will continue to fill until
the buffer is full. A hardware interrupt is generated when the buffer is full and data can then
be read from the buffer. The mode of operation is first in, first out (FIFO). The purpose of this
example is to show how data can be captured both before and after an event (external trigger,
tap, wakeup, freefall).
-
Write 0x00 to Control 1 (CNTL1) to set the accelerometer in stand-by mode
Register Name
Address
Value
CNTL1
0x1B
0x00
-
Write 0x06 to Output Data Control (ODCNTL) to set the Output Data Rate (ODR) of the
accelerometer to 50 Hz.
This step is optional as this is also a default setting.
Register Name
Address
Value
ODCNTL
0x21
0x06
-
Write 0x30 to Interrupt Control 1 (INC1) to enable physical interrupt pin INT1, set the polarity
of the physical interrupt to active high and configure for latched operation.
Register Name
Address
Value
INC1
0x22
0x30
-
Write 0x40 to Interrupt Control 4 (INC4) to set the Buffer Full interrupt to be reported on
physical interrupt pin INT1.
Register Name
Address
Value
INC4
0x25
0x40
-
Write 0x2B (43d) to BUF_CNTL1, which sets a watermark level to exactly half of the buffer.
Register Name
Address
Value
BUF_CNTL1
0x5E
0x2B
-
Write 0xE2 to Buffer Control 2 (BUF_CNTL2) to enable the sample buffer (BUFE=1), to set
the resolution of the acceleration data samples collected to 16-bit resolution (BRES=1), to
enable the buffer full interrupt (BFIE=1), and set the operating mode of the sample buffer to
Trigger mode.