XC886/888CLM
Capture/Compare Unit 6
User’s Manual
14-5
V1.3, 2010-02
CCU6, V 1.0
14.1.1.3
Switching Rules
Compare actions take place in parallel for the three compare channels. Depending on
the count direction, the compare matches have different meanings. In order to get the
PWM information independent of the output levels, two different states have been
introduced for the compare actions: the active state and the passive state. Both these
states are used to generate the desired PWM as a combination of the control by T13, the
trap control unit and the multi-channel control unit. If the active state is interpreted as a
1 and the passive state as a 0, the state information is combined with a logical AND
function.
•
active AND active = active
•
active AND passive = passive
•
passive AND passive = passive
The compare states change with the detected compare-matches and are indicated by
the CC6xST bits. The compare states of T12 are defined as follows:
•
passive if the counter value is below the compare value
•
active if the counter value is above the compare value
This leads to the following switching rules for the compare states:
•
set to the active state when the counter value reaches the compare value while
counting up
•
reset to the passive state when the counter value reaches the compare value while
counting down
•
reset to the passive state in case of a zero-match without compare-match while
counting up
•
set to the active state in case of a zero-match with a parallel compare-match while
counting up
Figure 14-3
Compared States for Compare Value = 2
0
1
2
1
2
T12
compare
state
passive
active
compare-match
T12clk
CCU6_T12_center_cm2
*