cancel
Showing results for 
Search instead for 
Did you mean: 

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

abodi.1
Associate II


_legacyfs_online_stmicro_images_0693W00000bkOSYQA2.png

1 REPLY 1
Sarra.S
ST Employee

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.