cancel
Showing results for 
Search instead for 
Did you mean: 

Saturated data on STwinkT1B with the iis3dwb sensor

RaphaelP
Associate

Hello,

For a predictive maintenance project on an STwinkT1B board. I am using an iis3dwb vibration sensor.

When retrieving the data provided by the sensor, one of the obtained values is saturated close to 65535, which is close to 16 bits.

I am using the FIFO_continues mode and registers 0x78 to 0x7E to read the FIFO.

To summarize:

data_buffer[j] = raw_buffer[i] << 8 | raw_buffer[i+1];

with j ranging from 1 to 3 and i ranging from 0 to 7.

 

Please advices

Regards

Rapha

1 REPLY 1
SimonePradolini
ST Employee

Hello @RaphaelP 

Register 0x78 of the FIFO contains the tag, a value describing which kind of data are filed in the nest registers. Data value are contained only from registers 0x79 (see datasheet).

Are you aware about sensor driver released by ST on github? You can consider to use (or at least to have a look into) iis3dwb_fifo_out_raw_get or iis3dwb_fifo_out_multi_raw_get functions. They already implements what you need.

 

 

Best regards

Simone

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.