cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F3xx Can the DAC be switched between multiple comparators?

RMalc.1
Associate II

Hi, I'm new here. Working with STM32F303 and wanting to use the DAC externally and internally with comparators in an adaptive threshold config. Can the DAC be disconnected and the COMP internal + point hold a charge and continue to work while the DAC is changed and connected to another comparator. I will refresh say every 1mS.

Plan B is to connect the COMP external pin AND DAC internally together and use an external holding capacitor. Is this possible?

Plan C route DAC out to other analog GPIOs (multiplex) and wire to COMPs external pins with external holding capacitors. Looking at the datasheet, seems the DAC out is fixed.

So basically how much internal capacitance and impedance do the COMP inputs have?

Has anyone here tried it?

1 ACCEPTED SOLUTION

Accepted Solutions

> Can the DAC be disconnected [from comparator input]

No, at least not according to documentation; comparator input is connected to a multiplexer, so it connects to other signal source as soon as it's disconnected from DAC. While the COMP1_CSR.COMPxINMSEL bitfields contain Reserved values, I'm not sure they are actually "disconnet" or "floating". Even if so, I personally wouldn't count on more than a few pF of internal capacitance; in other words, I wouldn't expect this scheme to have any chance of working at all.

I don't think you can achieve what you intend, without having an external multiplexer such as CD4051.

JW

View solution in original post

2 REPLIES 2

> Can the DAC be disconnected [from comparator input]

No, at least not according to documentation; comparator input is connected to a multiplexer, so it connects to other signal source as soon as it's disconnected from DAC. While the COMP1_CSR.COMPxINMSEL bitfields contain Reserved values, I'm not sure they are actually "disconnet" or "floating". Even if so, I personally wouldn't count on more than a few pF of internal capacitance; in other words, I wouldn't expect this scheme to have any chance of working at all.

I don't think you can achieve what you intend, without having an external multiplexer such as CD4051.

JW

RMalc.1
Associate II

Thank you for helping.​