Already walked through a dozend of diffrent uC Architectures Zilog, Motorola, Infineon, STM, AMD and more in the recent years. But for the moment the Texas Instruments TMS320C24x Peripheral description drives me crazy.
The Texas datasheet consists of a mix of feature lists and examples some diagramms and some descriptions. Everything shaked and then printed.
There are 3 Timers. Only Timer 2&3 can be cascaded. Each timer has its own compare function but there are also 3 full compare units and3 simple compare units. But later you read, that full compare is only possible for timer1 and simple compare is only possible for timer 1 and 2. Full compare outputs are inverted and non inverted with additional dead band support for push pull amplifiers while simple compare units have only one output pin. Becouse the simple compare output pin is diffrent from the full compare outputs, there is a total of 9 output pins for 3 timers. Maybe I start being to old to learn new things but for those 3 timers I had to read 100 pages !!! (chapter2) and when I am through I have to start again becouse I did not understand anything and have no overview above the possible functions. Maybe things are complex but the more complex something is, the more care should be taken on how to divide the chapters. Good diagrams can say more than 1000 words. The writers for datasheets may be good chip designers but sometimes I doubt they already heard anything from didactic skills.
But maybe there are some Texas Counter specialists here:
My Timer 2 is connected to an encoder. This works already well counting up and down with the axis. Only forward direction important. At a specific angle, a magnet valve should be switched on and at another angle it shoud be switched off again. The rising edge current for the magnet valve should be an initial pulse with variable length. Therefore timer 3 can possibly provide a time reference. After that, a hold current limited by PWM should be applied to the valve. Therefore timer 1 provides a PWM base freqency (approx 5-10 khz) and variable width. Cannot use the simple compare outputs becouse this would require a HW change in the design. Timer 3 currently makes a countdown interrupt for system time tic interrupt.
How to setup the Action Controll Registers and what is the best output pin? This task requires 2 timer outputs one for initial pulse and one for PWM connected by wired or? Can I achieve HW action accuracy for the initial pulse, pulse length and PWM stop position or time or do I have to use Interrupt Service to enable disable the PWM outputs?