Skip to main content
TWaks.1
Associate
Sep 22, 2020 2:33 PM UTC
Solved

Sending comparator to output

Hi.

I am working on microcontroller STM32L072KZ and STM32CubeMX.

I am trying to set a value of one pin depending on comparator value. I do not know how to do it in STM32CubeMX.

I want to do it using only hardware, not software.

Can anyone help me?

This topic has been closed for replies.
TDK
TDKBest answer
Sep 22, 2020 5:59 PM UTC

enable external output?

0693W000004GlouQAC.png

"If you feel a post has answered your question, please click ""Accept as Solution""."

3 replies

TDK
TDKBest answer
Sep 22, 2020 5:59 PM UTC

enable external output?

0693W000004GlouQAC.png

"If you feel a post has answered your question, please click ""Accept as Solution""."
waclawek.jan
Super User
Sep 22, 2020 6:20 PM UTC

Set the respective pin to AF in GPIO_MODER, and select the proper AF number in GPIO_AFR.

0693W000004GlsNQAS.png

JW

TWaks.1
TWaks.1Author
Associate
Sep 23, 2020 12:16 PM UTC

Thank you, I can't believe it was that easy.