Test in 2 weeks from now !!! 22-11-2018
Timers are used for counting pulses, can generate time base, measure period between events.
Types: -ADVANCED CONTROL TIMER- count from 1 TO65536
-GENERAL PURPOSE TIME-count from 1 to 32768
-BASIC TIMER- count from 1 to 128
Complementary outputs- It means that we have channel 1a and 1b. 1b is negated 1a. It is needed in bridges to provide negation channel(H bridge).
Timer synchronization is needed when we would like to avoid a noises occur between two clocks.
Auto reload register allows us to count to specific value and reload after it. After it flag is appearing in some specific place.
CAPTURE COMPARE ARRAY
Input stage is used for filtering input signal, It is especially useful when we drive motors and current spikes is appearing.
Output stage we can program output stage if signal occur we generate signal: it can be copy, negation etc of signal.
TRGIO is a synchronization signal (internal) to match working properties to input peripherals. In stm8 is mostly used to start ADC conversion to be run every one second.
ETR(pin in STM8) is external clock. It is useful to run some part of uC in another frequency.
Timers counting modes:
-underflow