cancel
Showing results for 
Search instead for 
Did you mean: 

Dear Sir, I am using LSM6DSL , I need to read the pedometer count. I can read it step by step through the INT1 What if I don't use the interrupt , how can I read the pedometer steps. Please Advise

EOved.1
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @Community member​ ,

You can poll the FUNC_SRC1 (53h) register, and in particular the STEP_DETECTED bit, that will be upgraded every time a step detector event is detected. It is then cleared when read. See the datasheet, p. 55, and the app note, p. 51.

The step detector interrupt signal can be driven to the INT1 interrupt pin by setting the INT1_STEP_DETECTOR bit of the INT1_CTRL register to 1; it can also be checked by reading the STEP_DETECTED bit of the FUNC_SRC1 register.

In this way, you are free not to use the physical interrupt pin, but you can just monitor the step counter register by a software routine.

If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster. 

-Eleon

View solution in original post

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi @Community member​ ,

You can poll the FUNC_SRC1 (53h) register, and in particular the STEP_DETECTED bit, that will be upgraded every time a step detector event is detected. It is then cleared when read. See the datasheet, p. 55, and the app note, p. 51.

The step detector interrupt signal can be driven to the INT1 interrupt pin by setting the INT1_STEP_DETECTOR bit of the INT1_CTRL register to 1; it can also be checked by reading the STEP_DETECTED bit of the FUNC_SRC1 register.

In this way, you are free not to use the physical interrupt pin, but you can just monitor the step counter register by a software routine.

If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster. 

-Eleon

understood thanks