Comparateor inputs selection in CubeMx2
Split from this post:
Dear ST Technical Moderator,
(mEALLEm)
many thanks for your prompt answer !
You actually solved my problem by using CubeMX2 tool,
where one can assign selected peripheral pins (in my case COMP2 two inputs and one output)
to actual package IO pins.
As far as I see, CubeMX2 tool “offered” to make assignment of
Comparator Plus input with one of four IO pins
COMP2_INP:
IO1: PA3
IO2: PB15
IO3: PC0
(I want to use PA3) !
and
Comparator Minus input with one of four IO pins
COMP2_INM:
IO1: PC1
IO2: PC5
IO3: PA2
(I want to use PA2) !
it is stated in my text, in the very beginning !
... quote
In new design, where planned MCU is STM32C542CCT6 device, (LQFP48 package),
I plan to use internal Comparator COMP2.
...
PA7 pin as Comparator2 Output
and pin PA2 as Comparator2 -INPut,
and pin PA3 as Comparator2 +INPut.
... unquote
Well,
the only problem is that I did not install SW development environment yet,
so,
I did not use CubeMX2 tool,
I was just reading the documentation, RefManual and device DS,
and I did not find any sentence related to IO correspondence you showed to me !
Besides, it seems to me that you also did not find such information in docs, as you mentioned in your reply
...
Meanwhile, I don’t see the I/O correspondence with COMPx-INy in the documentation.
...
??
However,
problem of STM32C5 MCU COMP2_IN Pins assignment
can be easily solved using CubeMX2,
but, there is not any specific instruction how to do that in docs !
Finally,
could you send me the code snippet as generated in CubeMX2
to see how the registers are filled to get the desired assignment ?
Once more,
Many thanks for your help !
Blažimir Miše,
BUCK
