cancel
Showing results for 
Search instead for 
Did you mean: 

When using the LSM6DS3TR-C, the ****_RST_STEP is 0 but it is still resetting my step count.

Invisibleman1002
Associate

I followed these instructions in the LSM6DS3TR-C datasheet.

Reading the WHO_AM_I register I get 6Ah.

A basic SW routine which shows how to enable the pedometer functions is as follows:

1. Write 20h to CTRL1_XL // Turn on the accelerometer

// ODR_XL = 26 Hz, FS_XL = ±2 g

2. Write 14h to CTRL10_C // Enable embedded functions and pedometer algorithm

3. Write 80h to INT1_CTRL // Step detector interrupt driven to INT1 pin

I move the Accelerometer and see steps accumulating.

After 3 minutes of no steps, I put the main Cpu to sleep. LSM6DS3TR-C stays powered.

When steps are detected by simulating steps again, the INT1 wakes up my CPU.

But sending the above commands to the registers reset the pedometer steps even though ****_RST_STEP is 0.

Is there a different setup to be used upon reconnecting to the device?

Why are the steps getting reset using this basic setup?

I reference this document for the basic setup:

AN5130

LSM6DS3TR-C: always-on 3D accelerometer and 3D gyroscope

Thank you,

Trey

1 REPLY 1
Invisibleman1002
Associate

It appears that using a Seeed XIAO BLE SENSE nrf52840, even though the LSM6DS3TR-C is awake while the XIAO is sleeping, when an interrupt wakes up the XIAO it ends up resetting the GPIO that the LSM6DS3TR-C is connected to. I haven't been able to confirm this, but it appears Seeed is allowing that GPIO to reset upon waking up(reset/boot). the nrf does state GPIO can maintain state, but I'm not sure what Seeed is doing yet.