Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

LM3S310 Datasheet(PDF) 284 Page - List of Unclassifed Manufacturers

Part # LM3S310
Description  Microcontroller
PDF  342 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  ETC2 [List of Unclassifed Manufacturers]
Direct Link  
Logo ETC2 - List of Unclassifed Manufacturers

LM3S310 Datasheet(HTML) 284 Page - List of Unclassifed Manufacturers

Back Button LM3S310 Datasheet HTML 280Page - List of Unclassifed Manufacturers LM3S310 Datasheet HTML 281Page - List of Unclassifed Manufacturers LM3S310 Datasheet HTML 282Page - List of Unclassifed Manufacturers LM3S310 Datasheet HTML 283Page - List of Unclassifed Manufacturers LM3S310 Datasheet HTML 284Page - List of Unclassifed Manufacturers LM3S310 Datasheet HTML 285Page - List of Unclassifed Manufacturers LM3S310 Datasheet HTML 286Page - List of Unclassifed Manufacturers LM3S310 Datasheet HTML 287Page - List of Unclassifed Manufacturers LM3S310 Datasheet HTML 288Page - List of Unclassifed Manufacturers Next Button
Zoom Inzoom in Zoom Outzoom out
 284 / 342 page
background image
Pulse Width Modulator (PWM)
284
October 6, 2006
Preliminary
14.2.7
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.
14.2.8
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.
14.3
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.
Enable the PWM clock by writing a value of 0x00100000 to the RCGC0 register in the System
Control module.
2.
In the GPIO module, enable the appropriate pins for their alternate function using the
GPIOAFSEL register.
3.
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).
4.
Configure the PWM generator for countdown mode with immediate updates to the
parameters.
– 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.
5.
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.
– Write the PWM0LOAD register with a value of 0x0000018F.
6.
Set the pulse width of the PWM0 pin for a 25% duty cycle.
– Write the PWM0CMPA register with a value of 0x0000012B.
7.
Set the pulse width of the PWM1 pin for a 75% duty cycle.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com