Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1126 | savelij | 1 | ifndef __52xxpwminc ; avoid multiple inclusion |
2 | __52xxpwminc equ 1 |
||
3 | |||
4 | save |
||
5 | listing off ; no listing over this file |
||
6 | |||
7 | ;**************************************************************************** |
||
8 | ;* * |
||
9 | ;* AS 1.42 - File 52XXPWM.INC * |
||
10 | ;* * |
||
11 | ;* Contains SFR and Bit Definitions for ColdFire MCF52xx PWM Module * |
||
12 | ;* * |
||
13 | ;**************************************************************************** |
||
14 | |||
15 | PWME equ MBAR_PWM+$020 ; PWM Enable Register (8b) |
||
16 | PWME7 cfbit PWME,7 ; PWM Channel 7 Enable. |
||
17 | PWME5 cfbit PWME,5 ; PWM Channel 5 Output Enable. |
||
18 | PWME3 cfbit PWME,3 ; PWM Channel 3 Output Enable. |
||
19 | PWME1 cfbit PWME,1 ; PWM Channel 1 Output Enable. |
||
20 | PWMPOL equ MBAR_PWM+$021 ; PWM Polarity Register (8b) |
||
21 | PPOL7 cfbit PWMPOL,7 ; PWM channel 7 polarity. |
||
22 | PPOL5 cfbit PWMPOL,5 ; PWM channel 5 polarity. |
||
23 | PPOL3 cfbit PWMPOL,3 ; PWM channel 3 polarity. |
||
24 | PPOL1 cfbit PWMPOL,1 ; PWM channel 1 polarity. |
||
25 | PWMCLK equ MBAR_PWM+$022 ; PWM Clock Select Register (8b) |
||
26 | PCLK7 cfbit PWMCLK,7 ; PWM channel 7 clock select. |
||
27 | PCLK5 cfbit PWMCLK,5 ; PWM channel 5 clock select. |
||
28 | PCLK3 cfbit PWMCLK,3 ; PWM channel 3 clock select. |
||
29 | PCLK1 cfbit PWMCLK,1 ; PWM channel 1 clock select. |
||
30 | PWMPRCLK equ MBAR_PWM+$023 ; PWM Prescale Clock Select Register (8b) |
||
31 | PCKB cffield PWMPRCLK,4,3 ; Clock B prescaler select. |
||
32 | PCKA cffield PWMPRCLK,0,3 ; Clock A prescaler select. |
||
33 | PWMCAE equ MBAR_PWM+$024 ; PWM Center Align Enable Register (8b) |
||
34 | CAE7 cfbit PWMCAE,7 ; Center align enable for channel 7. |
||
35 | CAE5 cfbit PWMCAE,5 ; Center align enable for channel 5. |
||
36 | CAE3 cfbit PWMCAE,3 ; Center align enable for channel 3. |
||
37 | CAE1 cfbit PWMCAE,1 ; Center align enable for channel 1. |
||
38 | PWMCTL equ MBAR_PWM+$025 ; PWM Control Register (8b) |
||
39 | CON67 cfbit PWMCTL,7 ; Concatenates PWM channels 6 and 7 to form one 16-bit PWM channel. |
||
40 | CON45 cfbit PWMCTL,6 ; Concatenates PWM channels 4 and 5 to form one 16-bit PWM channel. |
||
41 | CON23 cfbit PWMCTL,5 ; Concatenates PWM channels 2 and 3 to form one 16-bit PWM channel. |
||
42 | CON01 cfbit PWMCTL,4 ; Concatenates PWM channels 0 and 1 to form one 16-bit PWM channel. |
||
43 | PSWAI cfbit PWMCTL,3 ; PWM stops in doze mode. |
||
44 | PFRZ cfbit PWMCTL,2 ; PWM counters stop in debug mode |
||
45 | PWMSCLA equ MBAR_PWM+$028 ; PWM Scale A Register (8b) |
||
46 | SCALEA cffield PWMSCLA,0,8 ; Part of divisor used to form Clock SA from Clock A. |
||
47 | PWMSCLB equ MBAR_PWM+$029 ; PWM Scale B Register (8b) |
||
48 | SCALEB cffield PWMSCLB,0,8 ; Divisor used to form Clock SB from Clock B. |
||
49 | __N set 0 |
||
50 | rept 8 |
||
51 | __decstr __NS,__N |
||
52 | PWMCNT{"\{__NS}"} equ MBAR_PWM+$02C+__N ; PWM Channel n Counter Register (8b) |
||
53 | COUNT cffield PWMCNT{"\{__NS}"},0,8 ; Current value of the PWM up counter. |
||
54 | PWMPER{"\{__NS}"} equ MBAR_PWM+$034+__N ; PWM Channel n Period Register (8b) |
||
55 | PERIOD cffield PWMPER{"\{__NS}"},0,8 ; Period counter for the output PWM signal. |
||
56 | PWMDTY{"\{__NS}"} equ MBAR_PWM+$03C+__N ; PWM Channel n Duty Register (8b) |
||
57 | DUTY cffield PWMDTY{"\{__NS}"},0,8 ; Contains the duty value used to determine when a transition occurs on the PWM output signal |
||
58 | __N set __N+1 |
||
59 | endm |
||
60 | PWMSDN equ MBAR_PWM+$044 ; PWM Shutdown Register (8b) |
||
61 | IF cfbit PWMSDN,7 ; PWM interrupt flag. |
||
62 | IE cfbit PWMSDN,6 ; PWM interrupt enable. |
||
63 | RESTART cfbit PWMSDN,5 ; PWM restart. |
||
64 | LVL cfbit PWMSDN,4 ; PWM shutdown output level. |
||
65 | PWM7IN cfbit PWMSDN,2 ; PWM channel 7 input status. |
||
66 | PWM7IL cfbit PWMSDN,1 ; PWM channel 7 input polarity. |
||
67 | SDNEN cfbit PWMSDN,0 ; PWM emergency shutdown enable. |
||
68 | |||
69 | restore ; re-enable listing |
||
70 | |||
71 | endif ; __52xxpwminc |