4.1 Free-Running Period Mode

In the Free-Running Period mode of TMR2, the value of the T2TMR timer register is compared to the T2PR period register on each clock cycle. Upon a period match, the T2TMR timer register is reset in the next clock cycle, and continues counting. The UTMR operates in a similar way: the TUxyTMR timer/counter register is compared to the TUxyPR period register on each timer clock cycle. The RESET bits can be set to reset the counter upon a period register match (PR match). The following table shows UTMR settings in different TMR2 Free-Running Period modes:

Table 4-1. UTMR Settings for Different TMR2 Free-Running Period Modes
TMR2 MODE[4:0]TMR2 ModeUTMR SettingsComments
OutputOperationStartResetStopSTARTRESETSTOPOther
00000Period PulseSoftware gateON = 1ON = 0None (ON = 1)At PR MatchNone
00001Hardware gate, active-highON = 1 (and) ERS = 1ON = 0 (or) ERS = 0ERS Level - 1Either ERS Edge
00010Hardware gate, active-lowON = 1 (and) ERS = 0ON = 0 (or) ERS = 1EPOL = Inverted
00011Period Pulse with Hardware ResetRising or falling edge ResetON = 1Either ERS EdgeON = 0Either ERS EdgeAt Start + PR MatchNoneUTMR requires an edge to start for the very first time.
00100Rising edge ResetRising ERS EdgeRising ERS Edge
00101Falling edge ResetFalling ERS EdgeEPOL = Inverted
00110Low level ResetERS = 0ON = 0 (or) ERS = 0None (ON = 1)ERS Level - 0 + PR MatchNone
00111High level ResetERS = 1ON = 0 (or) ERS = 1EPOL = Inverted