Introduction - If you have any usage issues, please Google them yourself
How to configure the use of STM8 microcontroller external clock mode 1, the TIM1_CH1 channel external clock rising edge count, each to a rising edge of the clock, the counter time base plus 1