cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L451 comparator settings with VREFINTx inputs

y_liosha
Associate II

Hi All, 

In my application, I am using the STM32L451RCT6 and trying to configure COMP2 with the internal Vref as a reference (specifically 3/4 Vref). For some reason, it never worked. I was only able to get it working when using DAC_CH1 or an external source as the reference. After a few days of troubleshooting and research, I finally found a relevant block diagram along with an important note in the reference manual (page 532).

y_liosha_0-1779367182238.png

The thing is, there are no mentions or explanations of this behavior in the reference manual, datasheet, or errata other than this. Could you confirm whether the STM32L45x series actually supports using the internal Vref as a comparator reference or am I facing some other issue here? Thank you! 

 

12 REPLIES 12

Hello all,


@mƎALLEm wrote:

The case was internally escalated over this internal ticket CDM0062827 for follow-up.


After checking, the situation is as the following:

STM32L45x has only one DAC channel instance i.e.: DAC_CH1:

mALLEm_0-1779438781785.png

VREFINTx are available for both COMP instances.

The note under the figure 118 in the RM is a bit confusing. The proposal is to change the note to tell: "On devices with single DAC there is one single DAC input"

To conclude:

There are two COMP (COMP1, COMP2) each of them has all analog input flavors, but only L45x/L46x have no DAC2 input, but all the rest is available.

Hope it's clear.

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.
waclawek.jan
Super User

@mƎALLEm , thanks.

JW

Thank you for the clarification! I will take a deeper look into the code to figure out what is causing the VREFINT issue I am facing.

Announcement

We’re moving the ST Community to a new platform to give you a better and more reliable community experience.