How would you configure a microcontroller timer to generate a precise PWM signal for motor speed control?