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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-06 11:11 PM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-08 6:17 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-08 6:17 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-08 9:10 PM
understood thanks
