cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply Pedometer Regression output (.ucf/.json) for SensorTile.box Pro?

joseph_binu
Associate II

Hi ST Community,

I am working on a project using the SensorTile.box Pro. My goal is to implement a highly accurate step counter using the LSM6DSV16X's embedded pedometer.

What I have done:

  1. I recorded data patterns at 30Hz and successfully ran the Pedometer Regression Tool in MEMS Studio.

  2. The tool generated the optimum configuration files (pedometer.json ).

  3. I converted these register settings into a .ucf file format.

The Problem: I need to apply these "Golden Settings" to the sensor initialization in AlgoBuilder so they persist after a reset. However, I am unable to find a standard method to load this configuration:

  • I checked the Sensor Hub block properties, but I do not see a "Load Configuration/UCF" option.

  • I searched the Library for a "Register Write" block to manually input the values, but this block seems missing or hidden in my version of AlgoBuilder (I only see Acceleration, FSM/MLC, Sensor Hub, etc. under the Sensor Hub folder).

My Question: What is the correct way to inject a custom register configuration (or load a .ucf file) for the LSM6DSV16X sensor in the SensorTile box Pro?

  • Is there a specific block I should use (e.g., the FSM/MLC block as a container)?

  • Or do I need to use a Custom Code block? If so, what is the syntax for writing registers during initialization ?

Hardware/Software Details:

  • Board: SensorTile.box Pro (STEVAL-MKBOXPRO)

  • Sensor: LSM6DSV16X

  • Software: AlgoBuilder (v2.2.0), MEMS Studio

Any guidance or a screenshot of the correct block setup would be greatly appreciated!

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Miroslav BATEK
ST Employee

Hello,

the usage of Custom Block Creator is described in MEMS Studio user manual UM3233 in chapter 7.20.

I'm attaching example of custom block for embedded pedometer, it configures the pedometer in LSM6DSV16X during initialization and in the main loop read the number of steps. You can use it as reference.

View solution in original post

4 REPLIES 4
Miroslav BATEK
ST Employee

Hello,
there is no specific block to read or write to sensor registers.
You need to create custom block with a specific code.
You can use following command to write to the sensor register:

BSP_MOTION_SENSOR_Write_Register(LSM6DSV16X_0, register_address, register_value);

In order to execute it only once during initialization it must be part of the Init code. You can create a function and add it in the Init code section.

joseph_binu
Associate II

Hi, 

Sorry for my late response. Can you explain to me the process of  creating the custom block . i tried to create the custom block in the MEMS Studio but it is not working. I don't understand what should be the inputs and outputs. Should i directly connect the custom block to the sensor hub? Please help me. 

Thank you for your understanding 

Miroslav BATEK
ST Employee

Hello,

the usage of Custom Block Creator is described in MEMS Studio user manual UM3233 in chapter 7.20.

I'm attaching example of custom block for embedded pedometer, it configures the pedometer in LSM6DSV16X during initialization and in the main loop read the number of steps. You can use it as reference.

joseph_binu
Associate II

Thank you for your help