Peak detection on a LIS3DSH gives 0
Hi, I am working on a MEMS LIS3DSH connected via SPI to a STM32F207ZG having the following configuration:
Full scale: 2g
Operating mode: 100Hz
Filter: 800Hz
Registers:
CTRL_REG3: 0x48 (Interrupt pulsed, active high)
CTRL_REG4: 0x6F (BDU enabled, XYZ enabled, 100Hz)
CTRL_REG5: 0x00 (BW 800Hz, FS=2g)
State machine:

Registers:
CTRL_REG1: 0x01 (State machine 1 enabled)
MASK_1A and MASK_1B : 0xFC (Axes X,Y and Z enabled as input for state machine)
TIM1_1 = 0x000A
TIM2_1 = 0x0010
THRS1_1: 0x55
SETT1: 0x81 (peak detection enabled)
The state machine is working as expected, after a motion the OUTW command is setting interrupt and the host MCU is reading out values. After S4 expires, state machine is returning to initial state without any additional interrupt.
The values are read from the host MCU in following order:
PEAK1
OUT_X
OUT_Y
OUT_Z
OUTS1
It is expected, that PEAK1 is holding the highest value detected within the first two states, but it is always having 0 even X,Y,Z and OUTS1 having correct values.
What am I doing wrong ?
Even Unico doesn't show any Peak values in the FSM window.
Thanks
Stephan
