cancel
Showing results for 
Search instead for 
Did you mean: 

Problem while using ADC with DMA ,we are not able to achieve 1 sample in 1 microsecond

Denial
Associate

We are using STM32F769I-Discovery board 

Our settings:-

We are configuring two ADC Channels . They are channel 7 and channel 8 of ADC3. We have enabled scan mode and continuous mode.

ClockPrescaler    = ADC_CLOCKPRESCALER_PCLK_DIV2; 

Resolution      = ADC_RESOLUTION_12B;

ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_RISING;

ExternalTrigConv   = ADC_EXTERNALTRIGCONV_T4_CC4;

DataAlign       = ADC_DATAALIGN_RIGHT;

DMAContinuousRequests = ENABLE;

EOCSelection     = DISABLE;

NbrOfConversion    = 2;

sConfig.Channel   = ADC_CHANNEL_8;         

sConfig.Rank     = 1;              

sConfig.SamplingTime = ADC_SAMPLETIME_480CYCLES;   

sConfig.Offset = 0;                

sConfig.Channel   = ADC_CHANNEL_9;         

sConfig.Rank     = 2;              

sConfig.SamplingTime = ADC_SAMPLETIME_480CYCLES;   

sConfig.Offset = 0; 

what we are doing:-

We are using timer to generate PWM signal ,using external trigger during the rising edge of the PWM signal we are starting ADC conversion

we are able to get 1000 samples in 4.8 milliseconds ,which is 1 sample = 4.8 microsecond.

issue:-

we want to achieve atleast 1 sample in 1 microsecond ,for that what parameters we have to change or any example code is available for this.

1 REPLY 1

The sample time seems ridiculously high, you'd need a source clock approaching 1 GHz​ for the current math to work.

Might want to use two ADC and a 1 MHz trigger, and a clocking and sample combination that takes less than 1us​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..