Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1186 | savelij | 1 | ifndef __stm8s001j3inc ; avoid multiple inclusion |
2 | __stm8s001j3inc equ 1 |
||
3 | |||
4 | save |
||
5 | listing off ; no listing over this file |
||
6 | |||
7 | ;**************************************************************************** |
||
8 | ;* * |
||
9 | ;* AS 1.42 - File REG001J3.INC * |
||
10 | ;* * |
||
11 | ;* contains SFR and Bit Definitions for STM8S001J3 * |
||
12 | ;* source: DS12129 Rev 3 * |
||
13 | ;* * |
||
14 | ;**************************************************************************** |
||
15 | |||
16 | ;---------------------------------------------------------------------------- |
||
17 | ; Memory Addresses |
||
18 | |||
19 | E2START label $4000 ; start address internal EEPROM |
||
20 | E2END label E2START+127 ; end " " " |
||
21 | |||
22 | FLASHSTART label $8000 ; start address internal Flash |
||
23 | |||
24 | RAMSTART label $0000 ; start address internal RAM |
||
25 | RAMEND label $03ff ; end " " " |
||
26 | |||
27 | ;---------------------------------------------------------------------------- |
||
28 | ; Option Bytes |
||
29 | |||
30 | OPT0 label $4800 ; Read-out protection |
||
31 | ROP bfield OPT0,0,8 |
||
32 | OPT1 label $4801 ; User boot code |
||
33 | UBC bfield OPT1,0,8 |
||
34 | NOPT1 label $4802 ; |
||
35 | NUBC bfield NOPT1,0,8 |
||
36 | OPT2 label $4803 ; Alternate function remapping |
||
37 | AFR bfield OPT2,0,8 |
||
38 | NOPT2 label $4804 ; |
||
39 | NAFR bfield NOPT2,0,8 |
||
40 | OPT3 label $4805 ; Misc. option |
||
41 | OPT_HSITRIM bit OPT3,4 |
||
42 | LSI_EN bit OPT3,3 |
||
43 | IWDG_HW bit OPT3,2 |
||
44 | WWDG_HW bit OPT3,1 |
||
45 | WWDG_HALT bit OPT3,0 |
||
46 | NOPT3 label $4806 |
||
47 | NHSITRIM bit NOPT3,4 |
||
48 | NLSI_EN bit NOPT3,3 |
||
49 | NIWDG_HW bit NOPT3,2 |
||
50 | NWWDG_HW bit NOPT3,1 |
||
51 | NWWDG_HALT bit NOPT3,0 |
||
52 | OPT4 label $4807 ; Clock option |
||
53 | EXTCLK bit OPT4,3 |
||
54 | CKAWUSEL bit OPT4,2 |
||
55 | PRSC1 bit OPT4,1 |
||
56 | PRSC0 bit OPT4,0 |
||
57 | NOPT4 label $4808 |
||
58 | NEXTCLK bit NOPT4,3 |
||
59 | NCKAWUSEL bit NOPT4,2 |
||
60 | NPRSC1 bit NOPT4,1 |
||
61 | NPRSC0 bit NOPT4,0 |
||
62 | OPT5 label $4809 ; HSE clock startup |
||
63 | HSECNT bfield OPT5,0,8 |
||
64 | NOPT5 label $480a |
||
65 | NHSECNT bfield NOPT5,0,8 |
||
66 | |||
67 | ;---------------------------------------------------------------------------- |
||
68 | ; Vectors |
||
69 | |||
70 | RESET_vect label $8000 ; Reset |
||
71 | TRAP_vect label $8004 ; Software interrupt |
||
72 | TLI_vect label $8008 ; External top level interrupt |
||
73 | AWU_vect label $800c ; Auto wake up from halt |
||
74 | CLK_vect label $8010 ; Clock controller |
||
75 | EXTI0_vect label $8014 ; Port A external interrupts |
||
76 | EXTI1_vect label $8018 ; Port B external interrupts |
||
77 | EXTI2_vect label $801c ; Port C external interrupts |
||
78 | EXTI3_vect label $8020 ; Port D external interrupts |
||
79 | EXTI4_vect label $8024 ; Port E external interrupts |
||
80 | SPI_vect label $8030 ; End of transfer |
||
81 | TIM1_vect label $8034 ; TIM1 update/overflow/underflow/trigger/break |
||
82 | TIM1_CAPT_vect label $8038 ; TIM1 capture/compare |
||
83 | TIM2_vect label $803c ; TIM2 update /overflow |
||
84 | TIM2_CAPT_vect label $8040 ; TIM2 capture/compare |
||
85 | UART1_TX_vect label $804c ; Tx complete |
||
86 | UART1_RX_vect label $8050 ; Receive register DATA FULL |
||
87 | I2C_vect label $8054 ; I2C interrupt |
||
88 | ADC1_vect label $8060 ; ADC1 end of conversion/analog watchdog interrupt |
||
89 | TIM4_vect label $8064 ; TIM4 update/overflow |
||
90 | FLASH_vect label $8068 ; EOP/WR_PG_DIS |
||
91 | |||
92 | ;---------------------------------------------------------------------------- |
||
93 | ; GPIO |
||
94 | |||
95 | include "gpio.inc" |
||
96 | __defgpio "PA",$5000 |
||
97 | __defgpio "PB",$5005 |
||
98 | __defgpio "PC",$500a |
||
99 | __defgpio "PD",$500f |
||
100 | __defgpio "PE",$5014 |
||
101 | __defgpio "PF",$5019 |
||
102 | |||
103 | ;---------------------------------------------------------------------------- |
||
104 | ; Flash |
||
105 | |||
106 | include "flash.inc" |
||
107 | __defflash $505a |
||
108 | |||
109 | ;---------------------------------------------------------------------------- |
||
110 | ; Interrupt Controller |
||
111 | |||
112 | include "itc.inc" |
||
113 | __defexti $50a0,6 |
||
114 | __defitc $7f70,30 |
||
115 | |||
116 | ;---------------------------------------------------------------------------- |
||
117 | ; Reset Controller |
||
118 | |||
119 | include "rst.inc" |
||
120 | __defrst $50b3 |
||
121 | |||
122 | ;---------------------------------------------------------------------------- |
||
123 | ; Clock Controller |
||
124 | |||
125 | include "clk.inc" |
||
126 | __defclk $50c0 |
||
127 | |||
128 | ;---------------------------------------------------------------------------- |
||
129 | ; Window Watchdog |
||
130 | |||
131 | include "wwdg.inc" |
||
132 | __defwwdg $50d1 |
||
133 | |||
134 | ;---------------------------------------------------------------------------- |
||
135 | ; Independent Watchdog |
||
136 | |||
137 | include "iwdg.inc" |
||
138 | __defiwdg $50e0 |
||
139 | |||
140 | ;---------------------------------------------------------------------------- |
||
141 | ; Beeper |
||
142 | |||
143 | include "beep.inc" |
||
144 | __defbeep $50f3 |
||
145 | |||
146 | ;---------------------------------------------------------------------------- |
||
147 | ; Serial Peripheral Interface |
||
148 | |||
149 | include "spi.inc" |
||
150 | __defspi $5200 |
||
151 | |||
152 | ;---------------------------------------------------------------------------- |
||
153 | ; I2C |
||
154 | |||
155 | include "i2c.inc" |
||
156 | __defi2c $5210 |
||
157 | |||
158 | ;---------------------------------------------------------------------------- |
||
159 | ; UART1 |
||
160 | |||
161 | include "uart1.inc" |
||
162 | __defusart1 "UART1",$5230 |
||
163 | |||
164 | ;---------------------------------------------------------------------------- |
||
165 | ; Timer 1 |
||
166 | |||
167 | include "tim1.inc" |
||
168 | __deftim1 $5250 |
||
169 | |||
170 | ;---------------------------------------------------------------------------- |
||
171 | ; Timer 2 |
||
172 | |||
173 | include "tim2.inc" |
||
174 | __deftim2 $5300,2 |
||
175 | |||
176 | ;---------------------------------------------------------------------------- |
||
177 | ; Timer 4 |
||
178 | |||
179 | include "tim4.inc" |
||
180 | __deftim4 $5340,2 |
||
181 | |||
182 | ;---------------------------------------------------------------------------- |
||
183 | ; A/D Converter 1 |
||
184 | |||
185 | include "adc1.inc" |
||
186 | __defadc1 "ADC",$53e0,$5400 |
||
187 | |||
188 | ;---------------------------------------------------------------------------- |
||
189 | ; CPU |
||
190 | |||
191 | include "stm8/cpuregs.inc" |
||
192 | __defcpuregs $7f00 |
||
193 | |||
194 | ;---------------------------------------------------------------------------- |
||
195 | ; Single Wire Interface Module |
||
196 | |||
197 | include "stm8/swim.inc" |
||
198 | __defswim $7f80 |
||
199 | |||
200 | ;---------------------------------------------------------------------------- |
||
201 | ; Debug Module |
||
202 | |||
203 | include "stm8/dm.inc" |
||
204 | __defdm $7f90 |
||
205 | |||
206 | ;---------------------------------------------------------------------------- |
||
207 | ; AWU |
||
208 | |||
209 | include "awu.inc" |
||
210 | __defawu $50f0 |
||
211 | |||
212 | restore ; allow again |
||
213 | |||
214 | endif ; __stm8s001j3inc |