Introduction - If you have any usage issues, please Google them yourself
Use the STM32 Advanced Control Timer PWM input capture mode to measure the PWM waveform frequency and period. Learn to use advanced control timer input capture function, and general-purpose timer PWM output function.