Texas Instruments Development Kit for TM4C129x,Tiva™ ARM® Cortex™ -M4 Microcontroller DK-TM4C129X DK-TM4C129X 데이터 시트

제품 코드
DK-TM4C129X
다운로드
페이지 2182
■ Write the PWM0LOAD register with a value of 0x0000.018F.
8.
Set the pulse width of the
MnPWM0
pin for a 25% duty cycle.
■ Write the PWM0CMPA register with a value of 0x0000.012B.
9.
Set the pulse width of the
MnPWM1
pin for a 75% duty cycle.
■ Write the PWM0CMPB register with a value of 0x0000.0063.
10. Start the timers in PWM generator 0.
■ Write the PWM0CTL register with a value of 0x0000.0001.
11. Enable PWM outputs.
■ Write the PWMENABLE register with a value of 0x0000.0003.
28.5
Register Map
Table 28-2 on page 1941 lists the PWM registers. The offset listed is a hexadecimal increment to the
register's address, relative to the PWM module's base address:
■ PWM0: 0x4002.8000
Note that the PWM module clock must be enabled before the registers can be programmed. There
must be a delay of 3 system clocks after the PWM module clock is enabled before any PWM module
registers are accessed.
Table 28-2. PWM Register Map
See
page
Description
Reset
Type
Name
Offset
PWM Master Control
0x0000.0000
RW
PWMCTL
0x000
PWM Time Base Sync
0x0000.0000
RW
PWMSYNC
0x004
PWM Output Enable
0x0000.0000
RW
PWMENABLE
0x008
PWM Output Inversion
0x0000.0000
RW
PWMINVERT
0x00C
PWM Output Fault
0x0000.0000
RW
PWMFAULT
0x010
PWM Interrupt Enable
0x0000.0000
RW
PWMINTEN
0x014
PWM Raw Interrupt Status
0x0000.0000
RO
PWMRIS
0x018
PWM Interrupt Status and Clear
0x0000.0000
RW1C
PWMISC
0x01C
PWM Status
0x0000.0000
RO
PWMSTATUS
0x020
PWM Fault Condition Value
0x0000.0000
RW
PWMFAULTVAL
0x024
PWM Enable Update
0x0000.0000
RW
PWMENUPD
0x028
PWM0 Control
0x0000.0000
RW
PWM0CTL
0x040
PWM0 Interrupt and Trigger Enable
0x0000.0000
RW
PWM0INTEN
0x044
PWM0 Raw Interrupt Status
0x0000.0000
RO
PWM0RIS
0x048
1941
December 13, 2013
Texas Instruments-Advance Information
Tiva
TM4C129XNCZAD Microcontroller