LIS3DSH Pedometer State Machine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-09-30 9:46 PM
Hi,
We are trying to develop a pedometer based on LIS3DSH. We already have a
STM32F4 (F407) discovery board equipped with LIS3DSH. As stated in the document
"Application Guidelines for LIS3DSH State Machine", there is an
application "Pedometer Based on State Machine".
If anyone has the code, would you please share.
Regards,
ierturk
- Labels:
-
Accelerometers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-01 1:44 AM
I would recommend you software pedometer library (MotionPM) , the accuracy will be better than pedometer based on state machine. You can find this library in the X-CUBE-MEMS1 package.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-01 4:56 AM
Hi Miroslav,
Thanks for your prompt reply. I've already checked it. But if you have the state machine version of pedometer please share it. Because we try to reduce current consumption of whole system, and accuracy is is not our primary goal.
Thanks in advance.
Regards,
ierturk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-02 7:31 AM
Hi Miroslav,
I have tried the MotionPM library on the STM32F4 discovery board, but not succeeded. When the library initialize function called, other custom initialization is overridden by the library. So there is no way to use the library. Also there is no details in the documents.
Regards,
ierturk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-02 7:36 AM
What you mean by "custom initialization is overridden by the library"?
The library needs enabled clock for CRC unit, so please be sure the clock is enabled.
I'm also trying to get the configuration for the state machine for pedometer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-02 7:56 AM
Hi Miroslav, the custom initialization is my initialization for the interrupts. For example external interrupt EXTI9:5 is enabled before and after library initialization (MotionPM_Initialize). Some of them comes from CubeMX. Also CRC is enabled. But I don't understand the "clock".
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-02 8:03 AM
The library is HW independent (except CRC) it doesn't operate with any interrupt. There must be something wrong in your project.
Basically enable CRC means enable clock signal for the CRC unit. You can check the Pedometer application in X-CUBE-MEMS1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-02 8:33 AM
Ok. Thanks. I'll check it again, and let you know. It will be good, if you get state machine of pedometer.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-02 8:45 PM
Hi Miroslav, It seems the MotionPM library runs. However, in case of the Update function is called, the other interrupt source (in my case it comes from an RF module) ceases to run for some reason. I think I have a timing problem. Regarding the accuracy of the library, I have no idea at the moment.
Regards
