Skip to main content
EYako.1
Associate II
March 11, 2024
Solved

Audio functionality on LSM6DSV16B accelerometer

  • March 11, 2024
  • 3 replies
  • 2386 views

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?

This topic has been closed for replies.
Best answer by Federica Bossi

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;

3 replies

Federica Bossi
Technical Moderator
March 12, 2024

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
EYako.1Author
Associate II
March 12, 2024

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)?

Tesla DeLorean
Guru
March 12, 2024

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 VenmoUp vote any posts that you find helpful, it shows what's working..
EYako.1
EYako.1Author
Associate II
March 18, 2024

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,

Federica Bossi
Technical Moderator
March 19, 2024

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.