Skip to main content
parobin
Associate
Apr 3, 2019 12:20 PM UTC
Solved

How to use DAC as VREF for COMP2 ?

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.
waclawek.jan
waclawek.janBest answer
Super User
Apr 3, 2019 12:57 PM UTC

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
Apr 3, 2019 12:57 PM UTC

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
Apr 3, 2019 1:28 PM UTC

Okay, thank you.