LM3S317 Luminary Micro, Inc, LM3S317 Datasheet - Page 315
LM3S317
Manufacturer Part Number
LM3S317
Description
Lm3s317 Arm Microcontroller
Manufacturer
Luminary Micro, Inc
Datasheet
1.LM3S317.pdf
(376 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
LM3S317-EQN25-C2
Manufacturer:
Texas Instruments
Quantity:
10 000
Company:
Part Number:
LM3S317-EQN25-C2T
Manufacturer:
Texas Instruments
Quantity:
10 000
Company:
Part Number:
LM3S317-IGZ25-C2
Manufacturer:
TI
Quantity:
168
Company:
Part Number:
LM3S317-IQN25-C2
Manufacturer:
Texas Instruments
Quantity:
135
Company:
Part Number:
LM3S317-IQN25-C2
Manufacturer:
TI
Quantity:
78
Part Number:
LM3S317-IQN25-C2
Manufacturer:
TI/德州仪器
Quantity:
20 000
Company:
Part Number:
LM3S317-IQN25-C2T
Manufacturer:
Texas Instruments
Quantity:
10 000
- Current page: 315 of 376
- Download datasheet (3Mb)
15.2.7
15.2.8
15.3
February 6, 2007
timers in those blocks are synchronized, though this is not required in order for this mechanism to
function properly.
Fault Conditions
There are two external conditions that affect the PWM block; the signal input on the Fault pin and
the stalling of the controller by a debugger. There are two mechanisms available to handle such
conditions: the output signals can be forced into an inactive state and/or the PWM timers can be
stopped.
Each output signal has a fault bit. If set, a fault input signal causes the corresponding output signal
to go into the inactive state. If the inactive state is a safe condition for the signal to be in for an
extended period of time, this keeps the output signal from driving the outside world in a dangerous
manner during the fault condition. A fault condition can also generate a controller interrupt.
Each PWM generator can also be configured to stop counting during a stall condition. The user
can select for the counters to run until they reach zero then stop, or to continue counting and
reloading. A stall condition does not generate a controller interrupt.
Output Control Block
With each PWM generator block producing two raw PWM signals, the output control block takes
care of the final conditioning of the PWM signals before they go to the pins. Via a single register,
the set of PWM signals that are actually enabled to the pins can be modified; this can be used, for
example, to perform commutation of a brushless DC motor with a single register write (and without
modifying the individual PWM generators, which are modified by the feedback control loop).
Similarly, fault control can disable any of the PWM signals as well. A final inversion can be applied
to any of the PWM signals, making them active Low instead of the default active High.
Initialization and Configuration
The following example shows how to initialize the PWM Generator 0 with a 25-KHz frequency, and
with a 25% duty cycle on the PWM0 pin and a 75% duty cycle on the PWM1 pin. This example
assumes the system clock is 20 MHz.
1.
2.
3.
4.
5.
6.
Enable the PWM clock by writing a value of 0x00100000 to the RCGC0 register in the System
Control module.
In the GPIO module, enable the appropriate pins for their alternate function using the
GPIOAFSEL register.
Configure the Run-Mode Clock Configuration (RCC) register in the System Control module
to use the PWM divide (USEPWMDIV) and set the divider (PWMDIV) to divide by 2 (000).
Configure the PWM generator for countdown mode with immediate updates to the
parameters.
–
–
–
Set the period. For a 25-KHz frequency, the period = 1/25,000, or 40 microseconds. The PWM
clock source is 10 MHz; the system clock divided by 2. This translates to 400 clock ticks per
period. Use this value to set the PWM0LOAD register. In Count-Down mode, set the LOAD
field in the PWM0LOAD register to the requested period minus one.
–
Set the pulse width of the PWM0 pin for a 25% duty cycle.
Write the PWM0CTL register with a value of 0x00000000.
Write the PWM0GENA register with a value of 0x0000008C.
Write the PWM0GENB register with a value of 0x0000080C.
Write the PWM0LOAD register with a value of 0x0000018F.
Preliminary
LM3S317 Data Sheet
315
Related parts for LM3S317
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Lm3s1110 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet:
Part Number:
Description:
Lm3s1133 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet:
Part Number:
Description:
Lm3s1138 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet:
Part Number:
Description:
Lm3s1150 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet:
Part Number:
Description:
Lm3s1162 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet:
Part Number:
Description:
Lm3s1165 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet:
Part Number:
Description:
Lm3s1332 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet:
Part Number:
Description:
Lm3s1435 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet:
Part Number:
Description:
Lm3s1439 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet:
Part Number:
Description:
Lm3s1512 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet:
Part Number:
Description:
Lm3s1538 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet:
Part Number:
Description:
Lm3s1601 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet:
Part Number:
Description:
Lm3s1607 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet:
Part Number:
Description:
Lm3s1608 Arm Microcontroller
Manufacturer:
Luminary Micro, Inc
Datasheet: