Datasheet

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 1110).
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.
16.5 Register Map
Table 16-11 on page 1098 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 387). There must be a delay of 3 system clocks after the Timer module clock is enabled
before any Timer module registers are accessed.
Table 16-11. Timers Register Map
See
page
DescriptionResetTypeNameOffset
1100GPTM Configuration0x0000.0000RWGPTMCFG0x000
1101GPTM Timer A Mode0x0000.0000RWGPTMTAMR0x004
1106GPTM Timer B Mode0x0000.0000RWGPTMTBMR0x008
1110GPTM Control0x0000.0000RWGPTMCTL0x00C
1114GPTM Synchronize0x0000.0000RWGPTMSYNC0x010
1117GPTM Interrupt Mask0x0000.0000RWGPTMIMR0x018
June 18, 20141098
Texas Instruments-Production Data
General-Purpose Timers