cancel
Showing results for 
Search instead for 
Did you mean: 

ADC + DMA for Analog Microphone. I am using Sensortile.BOx STEVAL - MKSBOX1V1 Kit. 1. Is sampling rate for Calculation is correct 2. I have configured DMA + ADC - Kindly confirm whether configuration is ok. 3. How to read DMA Data and send to UART

Snara.21
Senior

ADC Sampling rate :-

Total Conversion Time (Tconv) = Samplingtime + 12 (This 12 is for 12-bit resolution of ADC). If I set 12.5 Cycles in MX based on the settings of the controller STM32L9RI

My ADCCLK Cycle will be =24.5 . Please confirm whether 12 to be added for calculation

0693W00000GYby1QAD.png0693W00000GYc7HQAT.png0693W00000GYc7qQAD.png0693W00000GYc8UQAT.png

2. The below is DMA Setting

0693W00000GYc8eQAD.png 

Added DMA Setting as ADC1

0693W00000GYc8tQAD.png 

In STM32Cube MX if the PCLK2/Prescalar value is 64 MhZ Which is 0.016 us

Total sampling time is therefore:

= 24.5 * 0.016 us = 0.392 us

Sample Rate = 1/.392 which is 2.55 MHz.

  1. Kindly confirm the calculation is correct 

ADC + DMA

0693W00000GYc9XQAT.png 

0693W00000GYc9mQAD.png

0 REPLIES 0