User Manual
549
Rev. 1.1
2019-03-18
TLE984xQX
Microcontroller with LIN and Power Switches for Automotive Applications
Capture/Compare Unit 6 (CCU6)
18.5
Trap Handling
The trap functionality permits the PWM outputs to react on the state of the input signal CTRAP. This
functionality can be used to switch off the power devices if the trap input becomes active (e.g. to perform an
emergency stop). The trap handling and the effect on the output modulation are controlled by the bits in the
trap control register TRPCTR. The trap flags TRPF and TRPS are located in register IS and can be set/cleared
by SW by writing to registers ISS and ISR.
gives an overview on the trap function.
The Trap Flag TRPF monitors the trap input and initiates the entry into the Trap State. The Trap State Bit TRPS
determines the effect on the outputs and controls the exit of the Trap State.
When a trap condition is detected (CTRAP = 0) and the input is enabled (TRPPEN = 1), both, the Trap Flag TRPF
and the Trap State Bit TRPS, are set to 1 (trap state active). The output of the Trap State Bit TRPS leads to the
Output Modulation Blocks (for T12 and for T13) and can there deactivate the outputs (set them to the passive
state). Individual enable control bits for each of the six T12-related outputs and the T13-related output
facilitate a flexible adaptation to the application needs.
There are a number of different ways to exit the Trap State. This offers SW the option to select the best
operation for the application. Exiting the Trap State can be done either immediately when the trap condition
is removed (CTRAP = 1 or TRPPEN = 0), or under software control, or synchronously to the PWM generated by
either Timer T12 or Timer T13.
Figure 151 Trap Logic Block Diagram
Clearing of TRPF is controlled by the mode control bit TRPM2. If TRPM2 = 0, TRPF is automatically cleared by
HW when CTRAP returns to the inactive level (CTRAP = 1) or if the trap input is disabled (TRPPEN = 0). When
TRPM2 = 1, TRPF must be reset by SW after CTRAP has become inactive.
Clearing of TRPS is controlled by the mode control bits TRPM1 and TRPM0 (located in the Trap Control Register
TRPCTR). A reset of TRPS terminates the Trap State and returns to normal operation. There are three options
selected by TRPM1 and TRPM0. One is that the Trap State is left immediately when the Trap Flag TRPF is
cleared, without any synchronization to timers T12 or T13. The other two options facilitate the
synchronization of the termination of the Trap State to the count periods of either Timer T12 or Timer T13.
gives an overview on the associated operation.
CCU6_MCB05541
Trap
Entry / Exit
Control
To T12,
T13 Output
Modulation
CTRAP
TRPPEN
TRM2
TRPF
RTRPF
STRPF
Trap Exit
Synchro-
nization
TRM0/1
TRPS
T12_ZM
T13_ZM