How do you configure and use timers for generating precise delays or PWM signals in embedded systems?