2025-12-16 2:39 AM
Hi,
I am trying to configure the internal cooperators in the STM32F051 micro-controller, but in the .ioc file I am able to configure only one Comparator. I require three comparators for my application. Is it possible to configure multiple comparators on the STM32F051 development board? If so, could someone please explain how to configure multiple comparators in the STM32F051 micro-controller?
2025-12-16 3:16 AM - edited 2025-12-16 3:17 AM
> I require three comparators for my application.
> I am able to configure only one Comparator
Maybe there's some conflict between second comparator and some other peripheral, which prevents CubeMX from enabling it. I don't use Cube/CubeMX.
If you don't need the 3 comparators at the same time, you may be able to switch between inputs to use one comparator for two or three inputs. Details need to be looked up in the RM. This is probably not something you can click in CubeMX.
JW
2025-12-16 5:27 AM
> STM32F051
What is the full chip number you are using? Letters after this...
Only one ST board that uses this chip and comparators 1 and 2 are easily configurable in CubeMX with it.
Attach your IOC file. Perhaps the pins are already being used by other peripherals.