2023-03-14 04:01 AM
Hi,
I trying to get the wrist tilt working. I have used the example in AN5040 page 55.
I using the simple example setup, nothing else is set.
When reading the FUNC_SRC2 it always returns 0x84 which should be impossible according to datasheet. The bit WRIST_TILT_IA never goes high no matter how much the unit is tilted.
I have already have accelerometer and gyroscope with FIFO and up and running so my drivers and the chip are working. However this I have disabled and are using only the 3 commands above.
What am I missing, any ideas?
Thanks
2023-04-12 06:27 AM
Hi @TStee.1 ,
Have you already tried the complete procedure,to be repeated when the accelerometer exits from Power-Down mode, described in AN5040?
1. Write 20h to CTRL1_XL // Turn on the accelerometer // ODR_XL = 26 Hz, FS_XL = ±2 g
2. Write 04h to CTRL10_C // Enable embedded functions
3. Wait 50 ms
4. Write 00h to CTRL10_C // Disable embedded functions
5. Write A0h to FUNC_CFG_ACCESS // Enable access to embedded registers (bank B)
6. Set new latency in A_WRIST_TILT_LAT
7. Set new threshold in A_WRIST_TILT_THS
8. Set new mask in A_WRIST_TILT_Mask
9. Write 00h to FUNC_CFG_ACCESS // Disable access to embedded registers (bank B)
10. Write 84h to CTRL10_C // Enable embedded functions // Enable AWT detection
11. Write 01h to DRDY_PULSE_CFG // AWT interrupt driven to the INT2 pin