Skip to main content
Explorer 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

    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.

    EYako.1Author
    Explorer 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)?

    Graduate II
    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.

    EYako.1Author
    Explorer 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,

    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.