https://deepbluembedded.com/stm32-dc-motor-speed-control-pwm-l293d-examples/
STM32 DC Motor Speed Control PWM With L293D - Motor Driver Library Examples