cancel
Showing results for 
Search instead for 
Did you mean: 

Audio functionality on LSM6DSV16B accelerometer

EYako.1
Associate III

Hey

LSM6DSV16B is sold as an accelerometer unit that can be used to record vibrations as an audio signal. The datasheet mentions that this audio signal can be placed on the TDM interface, but I doesn't really say how.

Does anyone have experience with this product? Is there already a code library for using this device for audio?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @EYako.1 ,

Yes, the drivers are generic, so also on that platform. The final user will however have to implement the routines for reading and writing registers.
In the examples are implementations for two standard platforms: MKI109V3 and Nucleus F411
/* Initialise mems driver interface */
dev_ctx.write_reg = platform_write;
dev_ctx.read_reg = platform_read;
dev_ctx.mdelay = platform_delay;
dev_ctx.handle = &SENSOR_BUS;

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.

View solution in original post

7 REPLIES 7
Federica Bossi
ST Employee

Hi @EYako.1 ,

You can find an example on github for the TDM interface.

In addition, you can look at AN5911 where in section 7 the TDM mode is described.

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.
EYako.1
Associate III

Hello Frederica, thank you for for your response.

 

The example you referenced utilizes the DISCOVERY_SPC584B board. Would that also be compatible with STM32WB (specifically P-NUCLEO-WB55 USB dongle)?

It looks to support several different platforms, using I2C and SPI. The STM32F4 might be the most portable.

Review the functional expectations of the code, port to your platform.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hi @EYako.1 ,

Yes, the drivers are generic, so also on that platform. The final user will however have to implement the routines for reading and writing registers.
In the examples are implementations for two standard platforms: MKI109V3 and Nucleus F411
/* Initialise mems driver interface */
dev_ctx.write_reg = platform_write;
dev_ctx.read_reg = platform_read;
dev_ctx.mdelay = platform_delay;
dev_ctx.handle = &SENSOR_BUS;

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.
EYako.1
Associate III

Hello

Are there also available drivers for Arduino? If not, what similar protocol can I use to interface with the device on an Arduino platform?

 

Best,

Hi @EYako.1 ,

No, we don't have drivers for Arduino. You could try to ask in an Arduino forum.

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.

@EYako.1 wrote:

what similar protocol can I use to interface with the device on an Arduino platform?


Depending on what you mean by "similar", @Tesla DeLorean said earlier that it also supports I2C and SPI - they are supported on Arduino ...