Cannot write any Free Fall bits on ISM330DLCTR
Hi all,
We're using the ISM330DLCTR in our design. We have the device set up in "Mode 1." OCS_AUX and SDO_AUX are marked as N/C on the schematic. SDX and SCX are pulled to GND. INT1 and the SPI control lines are going to our application processor.
The issue I'm noticing is that I'm unable to set any bits relating to the FreeFall function. I suspect I'm not able to set bits to the other embedded functions either.
I've read through the Application Note and have followed the steps they recommend:
- Turn on accelerometer via CTRL1_XL
- Enable interrupts and latch via TAP_CFG
- Set high bit of FF_DUR via WAKE_UP_DUR register, if dur that large.
- Set FF_DUR and FF_THS via the FREE_FALL register
- Enable the FF interrupt via a write to MD1_CFG
The problem I'm getting is that the bits relating to Free Fall don't ever set. I'm performing readbacks on all of these registers on write. Anytime I set a '1' to a Free Fall feature, regardless of register, it doesn't stick. I read back a 0 everytime. So FREE_FALL @ 0x5D always returns 0. The relevant bits on 0x5E return 0. I'm able to enable interrupts and latching, but those are general features.
I have fine SPI comms otherwise. the WHO_AM_I register works. This codebase was previously just polling the the X, Y, Z values so I'm fairly sure that works fine. But the free fall feature just won't enable.
I've looked through the application note and haven't found any mention of a flag that must be turned on to enable this feature.
I've gone through both the "RESET" and "REBOOT" steps to try and put the accelerometer in as clean of a state as possible before configuring it, still no luck.
I've tried the "Enable Embedded Functions" bit just in case that was relevant, no luck.
I've made sure the accelerometer isn't in a low power state by turning off the Inactivity feature. I've tried different ODRs. I've tried various states for the gyroscope, although that shouldn't be relevant per the docs. I feel like I've set and cleared just about every unrelated feature that the datasheet mentions, and cannot get these bits to set.
I've looked up other people's source code and haven't come across the smoking bullet I'm missing here.
Does anyone have an idea what I could be missing?
