cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F3, ADC w/ PGA & Multiplexer, synchronous Ping Pong Mode

edemier9
Associate II
Posted on April 08, 2016 at 14:56

Hallo.

I need to combine PGA and ADC for cases when the analog signal becomes very high or low.

Is there an example how to do that?

Additionally I would like to use one ADC for two synchronous signals by scanning two inputs. This is quite straight forward. However can I use one (!) PGA for one ADC sampling two inputs?

Thanks, regards,

Eduardo

#adc-opamp-timer-controlled
4 REPLIES 4
edemier9
Associate II
Posted on April 08, 2016 at 15:13

I think I have found it.

I need to connect the  TIM1 CC6  Trigger to the OPAMP input MUX and use the same  TIM1 as a trigger for the ADC. This will be tricky but I hope it will work.

edemier9
Associate II
Posted on April 08, 2016 at 15:28

Now there is one problem.

I need to do two ADC conversions on one full MUX cycle of CC6. How can I configure this?

Using sample on every edge is not good since the timing of the MUX and the ADC will then collide at 0/period!

Walid FTITI_O
Senior II
Posted on April 11, 2016 at 18:50

Hi deMier.Eduardo,

Refer to the OPAMP_PGA example in the

http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/LN1897/PF260613

at this path STM32Cube_FW_F3_V1.4.0\Projects\STM32303C_EVAL\Examples\OPAMP\OPAMP_PGA

-Hannibal-

edemier9
Associate II
Posted on April 12, 2016 at 13:44

Hi Hannibal.

Thanks for the link. The example describes the simplest possible operation mode of the OPAMP as PGA.

What I am looking for is using the OPAMP as PGA with

- timer driven MUX toggling at the non-inverting input and

- synchronous ADC-sampling at each (!) edge of the MUX switching timer signal.

The techniques is often described as Ping Pong ADC Mode. It is used for sampling two analog channels (IQ) before processing the data with a complex FFT.

This is far more complex than the example you provided. It would be great if you could look slightly deeper into this.

Thanks. Regards.

Eduardo

edited: I have found a desciption of this technique in the RM0364 Reference manual

STM32F334xx advanced ARM®-based 32-bit MCUs  in chapter 15.3.6 Timer controlled Multiplexer Mode of the OPAMP.

Is there a running example somewhere? I don't mind if it is any other STM32 device.

Thank you.