4. Configure the output state of the PWM signal (whether or not it is inverted) in the TnPWML field
of the GPTM Control (GPTMCTL) register.
5. If a prescaler is to be used, write the prescale value to the GPTM Timer n Prescale Register
(GPTMTnPR).
6. If PWM interrupts are used, configure the interrupt condition in the TnEVENT field in the
GPTMCTL register and enable the interrupts by setting the TnPWMIE bit in the GPTMTnMR
register. Note that edge detect interrupt behavior is reversed when the PWM output is inverted
(see page 986).
7. Load the timer start value into the GPTM Timer n Interval Load (GPTMTnILR) register.
8. Load the GPTM Timer n Match (GPTMTnMATCHR) register with the match value.
9. Set the TnEN bit in the GPTM Control (GPTMCTL) register to enable the timer and begin
generation of the output PWM signal.
In PWM Time mode, the timer continues running after the PWM signal has been generated. The
PWM period can be adjusted at any time by writing the GPTMTnILR register, and the change takes
effect at the next cycle after the write.
13.5 Register Map
Table 13-11 on page 974 lists the GPTM registers. The offset listed is a hexadecimal increment to
the register's address, relative to that timer's base address:
■ 16/32-bit Timer 0: 0x4003.0000
■ 16/32-bit Timer 1: 0x4003.1000
■ 16/32-bit Timer 2: 0x4003.2000
■ 16/32-bit Timer 3: 0x4003.3000
■ 16/32-bit Timer 4: 0x4003.4000
■ 16/32-bit Timer 5: 0x4003.5000
■ 16/32-bit Timer 6: 0x400E.0000
■ 16/32-bit Timer 7: 0x400E.1000
Note that the GP Timer module clock must be enabled before the registers can be programmed
(see page 380). There must be a delay of 3 system clocks after the Timer module clock is enabled
before any Timer module registers are accessed.
Table 13-11. Timers Register Map
See
page
DescriptionResetTypeNameOffset
976GPTM Configuration0x0000.0000RWGPTMCFG0x000
977GPTM Timer A Mode0x0000.0000RWGPTMTAMR0x004
982GPTM Timer B Mode0x0000.0000RWGPTMTBMR0x008
986GPTM Control0x0000.0000RWGPTMCTL0x00C
990GPTM Synchronize0x0000.0000RWGPTMSYNC0x010
993GPTM Interrupt Mask0x0000.0000RWGPTMIMR0x018
June 18, 2014974
Texas Instruments-Production Data
General-Purpose Timers