cancel
Showing results for 
Search instead for 
Did you mean: 

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

Snara.21
Senior
 
1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

12 REPLIES 12
Eleon BORLINI
ST Employee

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

Eleon BORLINI
ST Employee

Hi @Snara.2​ ,

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

-Eleon

Snara.21
Senior

@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
Senior

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

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
Senior

@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 

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

@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​  I have downloaded the this package. How shall I test it? I used ST BLE - Sensortile.Box is not detected.