cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F051 Comparator inverting input

michaelhagmann9
Associate II
Posted on May 05, 2014 at 08:19

Hello

I use the comparator module of a STM32F051.

The problem is that I need to change the input pin of the inverting input on the fly. In the datasheet, for COMP1 module, the input pins PA0, PA4 and PA5 are possible solutions (they are listed in the table of pin definitions as additional functions). Also in the MicroXplorer Tool, for COMP1 module, I can choose between Pin PA0, PA4 and PA5.

In the reference manual Rev4 (page 229), these three pins are listed as possible inverting inputs.

In the reference manual Rev5 (page 271), PA4 and PA5 are listed with the comment that the DAC must be enabled. And in the StdLib, when initializing with the COMP_InitTypeDef, I have no option to chose between these inputs.

My question now:

Is it possible to use COMP1 module with changing inverting input pin (PA0, PA4 and PA5) without the use of the DAC?

Thank you for support.

1 REPLY 1
Amel NASRI
ST Employee
Posted on May 30, 2014 at 18:11

Is it possible to use COMP1 module with changing inverting input pin (PA0, PA4 and PA5) without the use of the DAC?

If the DAC is enabled, so its output is internally used as COMP1 inverting input on pin PA4 (case of  DAC_OUT1) or on pin PA5 (case of DAC_OUT2 if available).

If the DAC is disabled, you can use any input signal connected externally to these pins as inverting input.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.