cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure the sample rate for the acceleration sensor in STEVAL-STLKT01V1 ?

Andrey Sedelnikov
Associate II
Posted on February 26, 2018 at 09:17

Hi,

I'm trying to read out the accelerator values using

STEVAL-STLKT01V1, on iOS. Is there any possibility to set the sample rate of the sensor?

Note: this post was migrated and contained many threaded conversations, some content may be missing.
8 REPLIES 8
Miroslav BATEK
ST Employee
Posted on February 26, 2018 at 09:50

What FW and application on iOS are you using?

Posted on February 26, 2018 at 10:00

When I connect to the sensor using ST App the sensor is found as BM2V220. I do not see any other possibility to read out the FW version. I've got sensors from my customer for whom I should write an iOS app so I do not know other details about the sensor HW. I'm trying to create iOS app using BlueSTSDK_iOS. 

Posted on February 26, 2018 at 10:55

The BM2V220 is shortcut for

https://my.st.com/content/my_st_com/en/products/embedded-software/mems-and-sensors-software/open-mems/bluemicrosystem2.html

 software.

It is obsolete and it has been replace d by 

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-ode-function-pack-sw/fp-sns-allmems1.html

.

But unfortunately none of these FW allow to set the sample rate of the sensor. You would have to modify the FW and implement a command for it.

Posted on February 26, 2018 at 17:20

Ok, so do I get it right that the sample rate will be automatically defined by the maximum possible hardware rate ? 

Posted on February 26, 2018 at 17:55

The sample rate is hard coded in the FW and for accelerometer it is set to 104Hz.

The FW which you are using is lets say demo, and it doesn't require any modification of the sample rate.

Posted on February 27, 2018 at 19:31

Hi, I have finally attached the sensor. Could you pls. explain the following results:

First number is the 'receiving timestamp' on iOS App, second is the Node Timestamp, third the value (Accelerator Z).

I assume the node timestamp is also in Miliseconds (right?). You said sample rate is 104Hz -> 1/104 is about 9 ms which is right.

But the the received timestamp gives interval between events like 30 ... 60 ms and this is the official system source for miliseconds. But then both do not match!  Could it be that the Node timestamp is in 10th if miliseconds? Then the timestamps would match but we will get the sample rate of about 60 ms!   

New data:  1519755367130 30405 942.0

New data:

 

1519755367160 30411 1006.0

New data:

 

1519755367219 30418 1007.0

New data:

 

1519755367280 30424 798.0

New data:

 

1519755367309 30430 951.0

New data:

 

1519755367370 30436 998.0
Posted on February 28, 2018 at 22:32

You have to distinguish several things:

- sensor ODR (output data rate) how often the sensor measure the data

- data reading frequency, how often the microcontroller reads data from the accelerometer

- bluetooth characteristics update rate

Each value can be different.

I would recommend you to update the FW in SensorTile to ALLMEMS1 and study the FW, you should be able to find all these information in the source code.

Posted on February 28, 2018 at 22:39

Ok, in that case the 104 Hz you were mentioning earlier refers to which thing - ODR or Data Reading frequency?

Also could you pls point me to the Sources of ALLMEMS1 as well as FW update instructions?