cancel
Showing results for 
Search instead for 
Did you mean: 

OPAMP2 -> ADC, no signal

steve239955_st
Associate II
Posted on October 09, 2015 at 11:13

Hey there,

using a STM32L476 board, I configured opamps1 and 2 chained, using opamp1 in conjunction with DAC to Change the DC Offset, and opamp2 in PGA mode. The Input signal gets passed through, we measure it on the output pin of OPAMP2 with oscilloscope, it Looks as expected.

But I don't get a Signal on the ADC - which as such is configured correctly (clocks etc), as when I configure an Input pin as ADC control and Input a Signal, it is sampled corectly.

I use ADC1 Channel 15, which goes on PB0, and from what I understand of the manual, should be connected to opamp2.out when configured as ANALOG.

But all I ''receive'' is noise of ~ -56dB, although the signal level at the opamp output pin looks good.

Is there more to do?

What exactly is necessary to connect the output of OPAMP2 to an ADC channel to sample the signal?

Are there constraints, e.g. if some hardware blocks are used in a certain mode, the opamp + ADC does not work, or something like that?

#stm32l4
1 REPLY 1
steve239955_st
Associate II
Posted on October 12, 2015 at 12:58

How strange!

Apparently, the position of doing the GPIO Init for the PB0 / ADC1_IN15 with regards to the whole sequence of other configurations of pins and / or peripherals is important.

The exact circumstances are yet to be worked out, but opamps 1,2 in chain, wich opamp1 doing the DC Offset via DAC, and opamp2 doing PGA, and ADC doing the sampling, now works as supposed, just because putting the initializing of GPIOB/pin0 in a different Position of the init sequence...

EDIT:

I can say that much:

When I got  only noise, the ADC's GPIO was configured before doing HAL_ADC_Init, whereas now, it is configured within the handler which the API calls when HAL_ADC_Init was invoked.