SLAU847F October 2022 – March 2026 MSPM0L1105 , MSPM0L1106 , MSPM0L1116 , MSPM0L1117 , MSPM0L1227 , MSPM0L1227-Q1 , MSPM0L1228 , MSPM0L1228-Q1 , MSPM0L1303 , MSPM0L1304 , MSPM0L1304-Q1 , MSPM0L1305 , MSPM0L1305-Q1 , MSPM0L1306 , MSPM0L1306-Q1 , MSPM0L1343 , MSPM0L1344 , MSPM0L1345 , MSPM0L1346 , MSPM0L2116 , MSPM0L2117 , MSPM0L2227 , MSPM0L2227-Q1 , MSPM0L2228 , MSPM0L2228-Q1
The functions of the counter block are outlined in the Figure 29-2. The counter operation can be controlled from hardware events (clock, reset, and enable) or through software configuration. Once enabled (TIMB.CTL0[j].EN = 1), the counter (TIMB.CNT[j]) increments by one on each positive edge of the counter clock. The counter continues incrementing until reaching the value stored in the respective load register (TIMB.LD[j]) generating an overflow (OVF). On the next positive clock edge the counter is reset to zero. The counter enable and reset behavior is summarized in Table 29-1.
| CTL0.EN[j] | Counter reset | Effect on counter |
|---|---|---|
| 0 | x | Counter remains in the current state |
| 1 | 0 | If the current value of the counter equals the LD value then, the counter overflows to 0, else counter = counter + 1 |
| 1 | 1 |
Counter is cleared to 0 |