SLAU723A October 2017 – October 2018 MSP432E401Y , MSP432E411Y
The main components of each GPTM block are two, free-running, up or down counters (Timer A and Timer B), two prescaler registers, two match registers, two prescaler match registers, two shadow registers, and two load/initialization registers and their associated control functions. The exact functionality of each GPTM is controlled by software and configured through the register interface. Timer A and Timer B can be used individually, in which case they have a 16-bit counting range for the 16- or 32-bit GPTM blocks. In addition, Timer A and Timer B can be concatenated to provide a 32-bit counting range for the 16- or 32-bit GPTM blocks. The prescaler can be used only when the timers are used individually.
Table 18-2 lists the available modes for each GPTM block. When counting down in one-shot or periodic modes, the prescaler acts as a true prescaler and contains the least-significant bits of the count. When counting up in one-shot or periodic modes, the prescaler acts as a timer extension and holds the most-significant bits of the count. In input edge count, input edge time and PWM mode, the prescaler always acts as a timer extension, regardless of the count direction.
Mode | Timer Use | Count Direction | Counter Size | Prescaler Size (1) |
---|---|---|---|---|
One-shot | Individual | Up or down | 16 bit | 8 bit |
Concatenated | Up or down | 32 bit | - | |
Periodic | Individual | Up or down | 16 bit | 8 bit |
Concatenated | Up or down | 32 bit | - | |
RTC | Concatenated | Up | 32 bit | - |
Edge count | Individual | Up or down | 16 bit | 8 bit |
Edge time | Individual | Up or down | 16 bit | 8 bit |
PWM | Individual | Down | 16 bit | 8 bit |
Software configures the GPTM using the GPTM Configuration (GPTMCFG) register (see Section 18.5.1), the GPTM Timer A Mode (GPTMTAMR) register (see Section 18.5.2), and the GPTM Timer B Mode (GPTMTBMR) register (see Section 18.5.3).
When configured in one of the concatenated modes, Timer A and Timer B can only operate in one mode. However, when configured in an individual mode, Timer A and Timer B can be independently configured in any combination of the individual modes.