Output Compare (OC) eTPU Function


This function generates a single edge or single pulse. Two events are scheduled at offset counts relative to a reference value (these are called event times). Each event occurs when its event time is greater than or equal to the value of a chosen timebase. The time base is selected from either of two free running timer counter registers. When each event occurs, a programmed pin action for that event takes place.

There are three reference mods in which the function can be initialized:

  1. Immediate reference mode
  2. Address reference mode
  3. Value Mode

Immediate Reference Mode
In this mode, the function adds offset1 to the current value of the selected timebase to generate the match value for the first event. The match value for the second event is generated by adding offset2 to the first event's match time.

Address Reference Mode
In this mode, the function adds offset1 to a vlue stored at a memory address to generate the match value for the first event. The match value of the second event is generated by adding offset2 to the first event's match time. Note that the reference may be either a future value or a value that occurred before the host service request was issued.

Value Reference Mode
In this mode, the first event occurs at an absolute time reference (TCR) value. Offset 1 is not used. The match value of the second event is generated by adding offset2 to the first event's match time, i.e. the absolute TCR value.

For full description refer to AN2852.