Using timer of STM8 to capture PWM then send value through Uart.