One-Shot Mode

In TMR2, the One-Shot mode is identical to the Free-Running Period mode except that the ON bit is cleared and the timer is stopped when T2TMR matches T2PR and will not restart until the ON bit is cycled off and on. This can easily be achieved in UTMR using the One-Shot Enable (OSEN) bit. The following table shows UTMR settings in different TMR2 One-Shot modes:
Table 1. UTMR Settings for Different TMR2 One-Shot Modes

TMR2

MODE[4:0]

TMR2 Mode UTMR Settings
Output Operation Start Reset Stop START RESET STOP Other
01000 One-shot Software start ON = 1 ON = 0 (or) Next clock after PR match None (ON = 1) At PR Match At PR Match OSEN = Enabled
01001

Edge-

Triggered Start

Rising edge start

ON = 1

(and)

Rising ERS Edge

Rising ERS Edge
01010 Falling edge start

ON = 1

(and)

Falling ERS Edge

OSEN = Enabled (and) EPOL = Inverted
01011 Any edge start

ON = 1

(and)

Either ERS Edge

Either ERS Edge At PR Match OSEN = Enabled
01100

Edge-

Triggered Start and Hardware Reset

Rising edge start and

Rising edge Reset

ON = 1

(and)

Rising ERS Edge

ERS = Rising ERS Edge ON = 0 (or) Next clock after PR match Rising ERS Edge At Start + PR Match At PR Match OSEN = Enabled
01101

Falling edge start and

Falling edge Reset

ON = 1

(and)

Falling ERS Edge

ERS = Falling ERS Edge At PR Match OSEN = Enabled (and) EPOL = Inverted
01110

Rising edge start and

Low-level Reset

ON = 1

(and)

Rising ERS Edge

ERS = 0 ERS Level - 0 + PR Match OSEN = Enabled
01111

Falling edge start and

High-level Reset

ON = 1

(and)

Falling ERS Edge

ERS = 1 OSEN = Enabled (and) EPOL = Inverted
10110 Level Triggered Start and Hardware Reset High-level start and Low-level Reset

ON = 1

ERS = 0 ON = 0 (or) Next clock after PR match (or) Held in Reset ERS Level - 1 ERS Level - 0 + PR Match At PR Match OSEN = Enabled
10111

Low-level start and

High-level Reset

ON = 1

ERS = 1 OSEN = Enabled (and) EPOL = Inverted