Skip to main content
TWaks.1
Associate
September 22, 2020
Solved

Sending comparator to output

  • September 22, 2020
  • 3 replies
  • 1138 views

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.
Best answer by TDK

enable external output?

0693W000004GlouQAC.png

3 replies

TDK
TDKBest answer
September 22, 2020

enable external output?

0693W000004GlouQAC.png

"If you feel a post has answered your question, please click ""Accept as Solution""."
waclawek.jan
Super User
September 22, 2020

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
September 23, 2020

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