Skip to main content
Snara.21
Senior
September 29, 2021
Solved

I am using Sensorile.BOX . I need a sample code or standard library , application notes and programming manual for Microphone TS922EIJT and MP23ABS1TR

  • September 29, 2021
  • 7 replies
  • 3822 views

..

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    Hi @Snara.2​ ,

    PCM data is defined by sample speed (8kHz in your case) and bit depth, for example 16 bits (or 12 bits for the ADC resolution). This means that, for a N.1 minute acquisition, you need 8kHz * 12bit * 60 sec = 5760 kbit = 720kByte.

    The STM32L4R9 on the Sensortile.box has:

    • 2-Mbyte Flash, 2 banks read-while-write, proprietary code readout protection
    • 640 Kbytes of SRAM including 64 Kbytes with hardware parity check

    You might use the internal flash, but there is the concrete risk you'll saturate it.

    So it's better you process your audio stream second by second, not minute by minute, at least if you want to do it in real-time. Otherwise you should find a memory for storage, such as a flash or the onboard SD card, but the processing will be no more in real-time.

    -Eleon

    7 replies

    Eleon BORLINI
    ST Employee
    October 4, 2021

    Hi @Snara.2​ ,

    as reference code for the Sensortile.box, including the analog microphone MP23ABS1TR acquisition, you can refer to the FP-SNS-STBOX1 firmware function pack, and in particular, for example, to the SDDataLogRToS project in the \Projects folder. The TS922EIJT is just an opamp and doesn't need any calibration (you might tune the input resistors for the gain, but I suggest you not to do it), and the MP23ABS1TR is an analog microphone that just streams an analog output proportional to the input.

    See also the UM2626.

    -Eleon

    Snara.21
    Snara.21Author
    Senior
    December 20, 2021

    @Eleon BORLINI​  I have downloaded the this package. How shall I test it? I used ST BLE - Sensortile.Box is not detected.

    Eleon BORLINI
    ST Employee
    December 21, 2021

    Hi @Snara.2​ ,

    if you want to use the BLE communication, you have to use the "BLE" examples. The SDDataLogRToS example is for storing data in the SDD card.

    0693W00000HpOA3QAN.png

    -Eleon

    Eleon BORLINI
    ST Employee
    October 6, 2021

    Hi @Snara.2​ ,

    let me please know whether you have any further updates about this :)

    -Eleon

    Snara.21
    Snara.21Author
    Senior
    October 6, 2021

    @Eleon BORLINI​ Thanks for your reply. I have downloaded the details shared and I am working on it, If any struck up will contact you

    Snara.21
    Snara.21Author
    Senior
    October 20, 2021

    hi @Eleon BORLINI​  I have tried that please let m eknow how shall I configure cube MX

    1. How to configure ADC in STEVAL - MKSBOX1v1 (With DMA or W/o DMA)
    2. How are the setting to be used for this board. (Clock dividing by ?) - For Audio it will be single channel continuous scan
    3. There are two pins in STEVAL - MKSBOX1V1 MREF and M1P what should I do that in MX and in the firmware function
    4. Whether any firmware logic is there for ADC Microphone if so please share the reference. If I create the [roject it has to work with the code I create, so please share the [rogramming manual for Analog Microphone
    Eleon BORLINI
    ST Employee
    October 21, 2021

    Hi @Snara.2​ ,

    I believe you should start with the predefined peripherals configuration in CubeMX for the SensorTile.box. In particular:

    • How to configure ADC in STEVAL - MKSBOX1v1 (With DMA or W/o DMA)

    The default configuration of ADC1 is without DMA. This ADC is dedicated to the analog microphone acquisition.

    0693W00000FDG2iQAH.png

    • How are the setting to be used for this board. (Clock dividing by ?) - For Audio it will be single channel continuous scan

    You can find the default clock tree configuration in the proper tab. The master clock is 120MHz. I would use this configuration.

    0693W00000FDG4yQAH.png

    • There are two pins in STEVAL - MKSBOX1V1 MREF and M1P what should I do that in MX and in the firmware function

    The MP1 and MREF are analog DC signals that are used to center the offset level with the TS922EIJT preamplifier dynamics. This avoids the risk to have negative analogic signals.

    • Whether any firmware logic is there for ADC Microphone if so please share the reference. If I create the project it has to work with the code I create, so please share the programming manual for Analog Microphone

    The audio is managed by the SensorTile.box_audio.c functions that you can find in the \Drivers\BSP\SensorTile.box folder.

    -Eleon

    Snara.21
    Snara.21Author
    Senior
    December 16, 2021

    @Eleon BORLINI​  We have used DFSDM filter for ADC in this sample code and DAC_out1 and MRef configuration details are not available. Guide me

    How to link DFSDM filter with ADC . Any document to connect and work and transfer to DMA

    Eleon BORLINI
    ST Employee
    December 21, 2021

    Hi @Snara.2​ ,

    please post this question on the STM32 group, topic STM32L4 (the one on the SensorTile.box): they'll be able to help you for sure more than me.

    -Eleon

    Snara.21
    Snara.21Author
    Senior
    November 17, 2021

    @Eleon BORLINI​ If I need to use 8Khz ,i.e High Quality Audio sampling how shall we do it , the clock freq for bus and main is 64 Mhz. If 1/8 KHz then it is 0.125msec

    1. What is the formulae for that to be loaded in the MX Cube.
    2. I need to capture the voice and transmit in the UART.
    3. Whatever we are speaking. for a minute
    4. What should be the buffer size to be configured.
    5. I have gone thro the Sensortile.box_audio but unfortunately it doesn't guide how to configure MX settings

    0693W00000GXuLjQAL.png 

    Eleon BORLINI
    Eleon BORLINIBest answer
    ST Employee
    November 26, 2021

    Hi @Snara.2​ ,

    PCM data is defined by sample speed (8kHz in your case) and bit depth, for example 16 bits (or 12 bits for the ADC resolution). This means that, for a N.1 minute acquisition, you need 8kHz * 12bit * 60 sec = 5760 kbit = 720kByte.

    The STM32L4R9 on the Sensortile.box has:

    • 2-Mbyte Flash, 2 banks read-while-write, proprietary code readout protection
    • 640 Kbytes of SRAM including 64 Kbytes with hardware parity check

    You might use the internal flash, but there is the concrete risk you'll saturate it.

    So it's better you process your audio stream second by second, not minute by minute, at least if you want to do it in real-time. Otherwise you should find a memory for storage, such as a flash or the onboard SD card, but the processing will be no more in real-time.

    -Eleon

    Snara.21
    Snara.21Author
    Senior
    January 6, 2022

    @Eleon BORLINI​ 

    Thanks for sharing the information. It works well. If I need to know the technical design parameters. How shall I find the infromations? For instance :- In SD Datalog RTOS - What is the RTOS Timer event configured, Crystal configuration, DFSDM Filter configuration with more details why this has been choosen and SD Card interface. Whether the MX file available.

    If I need to create a new project and add the code what would be the detail procedure to integrate witt the existing project which I am working (Which has all sensors available in SEnsortile.Box + BT).