Skip to main content
abodi.1
Associate II
May 18, 2023
Question

hello is there a function among the HALL functions that allows me to move the TIM1 output on the X axis through a potentionometer

  • May 18, 2023
  • 1 reply
  • 992 views


_legacyfs_online_stmicro_images_0693W00000bkOSYQA2.png

This topic has been closed for replies.

1 reply

ST Employee
May 19, 2023

Hello @abodi.1​,

No, there is no ready-to-use HAL function to vary a PWM signal through a pot

You need to connect the pot to an ADC_IN and then in the HAL_ADC_ConvCpltCallback, read the ADC value and vary the duty cycle.

I hope that helps!

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.