Skip to main content
parobin
Associate
April 3, 2019
Solved

How to use DAC as VREF for COMP2 ?

  • April 3, 2019
  • 2 replies
  • 865 views

Hi,

I use a STM32L052 and I would like to use DAC as VREF for comparator 2 (PB6) but without connecting DAC1 to PA4. It is possible ?

Because under STMCubeMX, when I set DAC as VREF for COMP2, it set automatically PA4 as DAC_OUT1 but in my application, PA4 is used for something else.

So is it possible to set DAC1 as VREF for COMP2 only in intern ?

This topic has been closed for replies.
Best answer by waclawek.jan

From RM:

Note: Once DAC_Channelx is enabled, the corresponding GPIO pin (PA4) is automatically

connected to the analog converter output (DAC_OUT1).

JW

2 replies

waclawek.jan
waclawek.janBest answer
Super User
April 3, 2019

From RM:

Note: Once DAC_Channelx is enabled, the corresponding GPIO pin (PA4) is automatically

connected to the analog converter output (DAC_OUT1).

JW

parobin
parobinAuthor
Associate
April 3, 2019

Okay, thank you.