| Digital Power Starter Kit 3 Firmware dsPIC33C Boost Converter Voltage Mode Control Example |

p33smps_devices.h
1 /*LICENSE ********************************************************************
2 * Microchip Technology Inc. and its subsidiaries. You may use this software
3 * and any derivatives exclusively with Microchip products.
4 *
5 * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
6 * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
7 * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
8 * PARTICULAR PURPOSE, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION
9 * WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION.
10 *
11 * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
12 * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
13 * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
14 * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
15 * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS
16 * IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF
17 * ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
18 *
19 * MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE
20 * TERMS.
21 * ***************************************************************************/
31 // This is a guard condition so that contents of this file are not included
32 // more than once.
33 #ifndef _MCAL_P33_SMPS_DEVICE_DEFINITION_H_
34 #define _MCAL_P33_SMPS_DEVICE_DEFINITION_H_
35
36 #include <xc.h> // include processor files - each processor file is guarded.
37
38 #if defined (__dsPIC33FJ06GS101__) || defined (__dsPIC33FJ06GS102__) || \
39 defined (__dsPIC33FJ06GS202__) || defined (__dsPIC33FJ16GS402__) || \
40 defined (__dsPIC33FJ16GS404__) || defined (__dsPIC33FJ16GS502__) || \
41 defined (__dsPIC33FJ16GS504__)
42 // YGAR family of devices
43
44 #define __P33SMPS_FJ__
45
46 #elif defined (__dsPIC33FJ32GS406__) || defined (__dsPIC33FJ64GS406__) || \
47 defined (__dsPIC33FJ32GS606__) || defined (__dsPIC33FJ64GS606__) || \
48 defined (__dsPIC33FJ32GS608__) || defined (__dsPIC33FJ64GS608__) || \
49 defined (__dsPIC33FJ32GS610__) || defined (__dsPIC33FJ64GS610__)
50 // UEAA family of devices
51
52 #define __P33SMPS_FJC__
53
54 #elif defined (__dsPIC33FJ06GS001__) || defined (__dsPIC33FJ06GS101A__) || \
55 defined (__dsPIC33FJ06GS102A__) || defined (__dsPIC33FJ16GS202A__) || \
56 defined (__dsPIC33FJ09GS302__)
57 // UEAG family of devices
58
59 #define __P33SMPS_FJA__
60
61 #elif defined (__dsPIC33EP16GS202__) || defined (__dsPIC33EP32GS202__)
62 // TLAL family of devices
63
64 #define __P33SMPS_EP__
65 #define __P33SMPS_EP2__
66
67 #elif defined (__dsPIC33EP16GS502__) || defined (__dsPIC33EP32GS502__) || defined (__dsPIC33EP64GS502__) || \
68 defined (__dsPIC33EP16GS504__) || defined (__dsPIC33EP32GS504__) || defined (__dsPIC33EP64GS504__) || \
69 defined (__dsPIC33EP16GS505__) || defined (__dsPIC33EP32GS505__) || defined (__dsPIC33EP64GS505__) || \
70 defined (__dsPIC33EP16GS506__) || defined (__dsPIC33EP32GS506__) || defined (__dsPIC33EP64GS506__)
71 // TLAH family of devices
72
73 #define __P33SMPS_EP__
74 #define __P33SMPS_EP5__
75
76 #elif defined (__dsPIC33EP128GS702__) || defined (__dsPIC33EP128GS704__) || defined (__dsPIC33EP128GS705__) || \
77 defined (__dsPIC33EP128GS706__) || defined (__dsPIC33EP64GS708__) || defined (__dsPIC33EP128GS708__) || \
78 defined (__dsPIC33EP64GS804__) || defined (__dsPIC33EP128GS804__) || defined (__dsPIC33EP64GS805__) || \
79 defined (__dsPIC33EP128GS805__) || defined (__dsPIC33EP64GS806__) || defined (__dsPIC33EP128GS806__) || \
80 defined (__dsPIC33EP64GS808__) || defined (__dsPIC33EP128GS808__)
81 // TLAY family of devices
82
83 #define __P33SMPS_EP__
84 #define __P33SMPS_EP7__
85 #define __P33SMPS_EP8__
86
87 #elif defined (__dsPIC33CH64MP202__) || defined (__dsPIC33CH128MP202__) || \
88 defined (__dsPIC33CH64MP202S1__) || defined (__dsPIC33CH128MP202S1__) || \
89 defined (__dsPIC33CH64MP203__) || defined (__dsPIC33CH128MP203__) || \
90 defined (__dsPIC33CH64MP203S1__) || defined (__dsPIC33CH128MP203S1__) || \
91 defined (__dsPIC33CH64MP205__) || defined (__dsPIC33CH128MP205__) || defined (__dsPIC33CH256MP205__) || defined (__dsPIC33CH512MP205__) || \
92 defined (__dsPIC33CH64MP205S1__) || defined (__dsPIC33CH128MP205S1__) || defined (__dsPIC33CH256MP205S1__) || defined (__dsPIC33CH512MP205S1__) || \
93 defined (__dsPIC33CH64MP206__) || defined (__dsPIC33CH128MP206__) || defined (__dsPIC33CH256MP206__) || defined (__dsPIC33CH512MP206__) || \
94 defined (__dsPIC33CH64MP206S1__) || defined (__dsPIC33CH128MP206S1__) || defined (__dsPIC33CH256MP206S1__) || defined (__dsPIC33CH512MP206S1__) || \
95 defined (__dsPIC33CH64MP208__) || defined (__dsPIC33CH128MP208__) || defined (__dsPIC33CH256MP208__) || defined (__dsPIC33CH512MP208__) || \
96 defined (__dsPIC33CH64MP208S1__) || defined (__dsPIC33CH128MP208S1__) || defined (__dsPIC33CH256MP208S1__) || defined (__dsPIC33CH512MP208S1__)
97 // Gemini family of devices (master and slave core))
98
99 #define __P33SMPS_CH__
100 #define __P33SMPS_CH2__
101
102 #if defined (__dsPIC33CH64MP202S1__) || defined (__dsPIC33CH128MP202S1__) || \
103 defined (__dsPIC33CH64MP203S1__) || defined (__dsPIC33CH128MP203S1__) || \
104 defined (__dsPIC33CH64MP205S1__) || defined (__dsPIC33CH128MP205S1__) || defined (__dsPIC33CH256MP205S1__) || defined (__dsPIC33CH512MP205S1__) || \
105 defined (__dsPIC33CH64MP206S1__) || defined (__dsPIC33CH128MP206S1__) || defined (__dsPIC33CH256MP206S1__) || defined (__dsPIC33CH512MP206S1__) || \
106 defined (__dsPIC33CH64MP208S1__) || defined (__dsPIC33CH128MP208S1__) || defined (__dsPIC33CH256MP208S1__) || defined (__dsPIC33CH512MP208S1__)
107 // Gemini family of devices (slave core)
108 #define __P33SMPS_CH_SLV__ //(depreciated)
109 #define __P33SMPS_CH_SLV1__ //(depreciated)
110 #define __P33SMPS_CH_SEC__
111 #define __P33SMPS_CH_SEC1__
112 #else
113 // Gemini family of devices (master core)
114 #define __P33SMPS_CH_MSTR__ //(depreciated)
115 #define __P33SMPS_CH_MAIN__
116 #endif
117
118
119 #elif defined (__dsPIC33CH64MP502__) || defined (__dsPIC33CH128MP502__) || \
120 defined (__dsPIC33CH64MP502S1__) || defined (__dsPIC33CH128MP502S1__) || \
121 defined (__dsPIC33CH64MP503__) || defined (__dsPIC33CH128MP503__) || \
122 defined (__dsPIC33CH64MP503S1__) || defined (__dsPIC33CH128MP503S1__) || \
123 defined (__dsPIC33CH64MP505__) || defined (__dsPIC33CH128MP505__) || defined (__dsPIC33CH256MP505__) || defined (__dsPIC33CH512MP505__) || \
124 defined (__dsPIC33CH64MP505S1__) || defined (__dsPIC33CH128MP505S1__) || defined (__dsPIC33CH256MP505S1__) || defined (__dsPIC33CH512MP505S1__) || \
125 defined (__dsPIC33CH64MP506__) || defined (__dsPIC33CH128MP506__) || defined (__dsPIC33CH256MP506__) || defined (__dsPIC33CH512MP506__) || \
126 defined (__dsPIC33CH64MP506S1__) || defined (__dsPIC33CH128MP506S1__) || defined (__dsPIC33CH256MP506S1__) || defined (__dsPIC33CH512MP506S1__) || \
127 defined (__dsPIC33CH64MP508__) || defined (__dsPIC33CH128MP508__) || defined (__dsPIC33CH256MP508__) || defined (__dsPIC33CH512MP508__) || \
128 defined (__dsPIC33CH64MP508S1__) || defined (__dsPIC33CH128MP508S1__) || defined (__dsPIC33CH256MP508S1__) || defined (__dsPIC33CH512MP508S1__)
129 // Gemini family of devices with CAN FD (master and slave core)
130
131 #define __P33SMPS_CH__
132 #define __P33SMPS_CH5__
133
134 #if defined (__dsPIC33CH64MP502S1__) || defined (__dsPIC33CH128MP502S1__) || \
135 defined (__dsPIC33CH64MP503S1__) || defined (__dsPIC33CH128MP503S1__) || \
136 defined (__dsPIC33CH64MP505S1__) || defined (__dsPIC33CH128MP505S1__) || defined (__dsPIC33CH256MP505S1__) || defined (__dsPIC33CH512MP505S1__) || \
137 defined (__dsPIC33CH64MP506S1__) || defined (__dsPIC33CH128MP506S1__) || defined (__dsPIC33CH256MP506S1__) || defined (__dsPIC33CH512MP506S1__) || \
138 defined (__dsPIC33CH64MP508S1__) || defined (__dsPIC33CH128MP508S1__) || defined (__dsPIC33CH256MP508S1__) || defined (__dsPIC33CH512MP508S1__)
139 // Gemini family of devices with CAN FD (slave core)
140 #define __P33SMPS_CH_SLV__ //(depreciated)
141 #define __P33SMPS_CH_SLV1__ //(depreciated)
142 #define __P33SMPS_CH_SEC__
143 #define __P33SMPS_CH_SEC1__
144 #else
145 #define __P33SMPS_CH_MSTR__ //(depreciated)
146 #define __P33SMPS_CH_MAIN__
147 #endif
148
149 #elif defined (__dsPIC33CK32MP102__) || defined (__dsPIC33CK64MP102__) || \
150 defined (__dsPIC33CK32MP103__) || defined (__dsPIC33CK64MP103__) || \
151 defined (__dsPIC33CK32MP105__) || defined (__dsPIC33CK64MP105__)
152 // Ara family of devices
153
154 #define __P33SMPS_CK__
155 #define __P33SMPS_CK1__
156
157 #elif defined (__dsPIC33CK32MP502__) || defined (__dsPIC33CK64MP502__) || defined (__dsPIC33CK128MP502__) || defined (__dsPIC33CK256MP502__) || \
158 defined (__dsPIC33CK32MP503__) || defined (__dsPIC33CK64MP503__) || defined (__dsPIC33CK128MP503__) || defined (__dsPIC33CK256MP503__) || \
159 defined (__dsPIC33CK32MP505__) || defined (__dsPIC33CK64MP505__) || defined (__dsPIC33CK128MP505__) || defined (__dsPIC33CK256MP505__) || \
160 defined (__dsPIC33CK32MP506__) || defined (__dsPIC33CK64MP506__) || defined (__dsPIC33CK128MP506__) || defined (__dsPIC33CK256MP506__) || \
161 defined (__dsPIC33CK64MP508__) || defined (__dsPIC33CK128MP508__) || defined (__dsPIC33CK256MP508__)
162 // Sagitta family of devices with CAN FD
163
164 #define __P33SMPS_CK__
165 #define __P33SMPS_CK5__
166
167 #else
168
169 #pragma message "selected device not supported by peripheral driver libraries"
170
171 #endif
172
173
174 #if defined (__dsPIC33FJ06GS101__)
175 #define __P33SMPS_FJ101__
176 #elif defined (__dsPIC33FJ06GS102__)
177 #define __P33SMPS_FJ102__
178 #elif defined (__dsPIC33FJ06GS202__)
179 #define __P33SMPS_FJ202__
180 #elif defined (__dsPIC33FJ16GS402__)
181 #define __P33SMPS_FJ402__
182 #elif defined (__dsPIC33FJ16GS404__)
183 #define __P33SMPS_FJ404__
184 #elif defined (__dsPIC33FJ16GS502__)
185 #define __P33SMPS_FJ502__
186 #elif defined (__dsPIC33FJ16GS504__)
187 #define __P33SMPS_FJ504__
188
189 #elif defined (__dsPIC33FJ06GS001__)
190 #define __P33SMPS_FJA001__
191 #elif defined (__dsPIC33FJ06GS101A__)
192 #define __P33SMPS_FJA101__
193 #elif defined (__dsPIC33FJ06GS102A__)
194 #define __P33SMPS_FJA102__
195 #elif defined (__dsPIC33FJ16GS202A__)
196 #define __P33SMPS_FJA202__
197 #elif defined (__dsPIC33FJ09GS302__)
198 #define __P33SMPS_FJA302__
199
200 #elif defined (__dsPIC33FJ32GS406__) || defined (__dsPIC33FJ64GS406__)
201 #define __P33SMPS_FJ406__
202 #elif defined (__dsPIC33FJ32GS606__) || defined (__dsPIC33FJ64GS606__)
203 #define __P33SMPS_FJ606__
204 #elif defined (__dsPIC33FJ32GS608__) || defined (__dsPIC33FJ64GS608__)
205 #define __P33SMPS_FJ608__
206 #elif defined (__dsPIC33FJ32GS610__) || defined (__dsPIC33FJ64GS610__)
207 #define __P33SMPS_FJ610__
208
209 #elif defined (__dsPIC33EP16GS202__) || defined (__dsPIC33EP32GS202__)
210 #define __P33SMPS_EP202__
211 #elif defined (__dsPIC33EP16GS502__) || defined (__dsPIC33EP32GS502__) || defined (__dsPIC33EP64GS502__)
212 #define __P33SMPS_EP502__
213 #elif defined (__dsPIC33EP16GS504__) || defined (__dsPIC33EP32GS504__) || defined (__dsPIC33EP64GS504__)
214 #define __P33SMPS_EP504__
215 #elif defined (__dsPIC33EP16GS505__) || defined (__dsPIC33EP32GS505__) || defined (__dsPIC33EP64GS505__)
216 #define __P33SMPS_EP505__
217 #elif defined (__dsPIC33EP16GS506__) || defined (__dsPIC33EP32GS506__) || defined (__dsPIC33EP64GS506__)
218 #define __P33SMPS_EP506__
219
220 #elif defined (__dsPIC33EP128GS702__)
221 #define __P33SMPS_EP702__
222 #elif defined (__dsPIC33EP128GS704__)
223 #define __P33SMPS_EP704__
224 #elif defined (__dsPIC33EP128GS705__)
225 #define __P33SMPS_EP705__
226 #elif defined (__dsPIC33EP128GS706__)
227 #define __P33SMPS_EP706__
228 #elif defined (__dsPIC33EP64GS708__) || defined (__dsPIC33EP128GS708__)
229 #define __P33SMPS_EP708__
230
231 #elif defined (__dsPIC33EP64GS804__) || defined (__dsPIC33EP128GS804__)
232 #define __P33SMPS_EP804__
233 #elif defined (__dsPIC33EP64GS805__) || defined (__dsPIC33EP128GS805__)
234 #define __P33SMPS_EP805__
235 #elif defined (__dsPIC33EP64GS806__) || defined (__dsPIC33EP128GS806__)
236 #define __P33SMPS_EP806__
237 #elif defined (__dsPIC33EP64GS808__) || defined (__dsPIC33EP128GS808__)
238 #define __P33SMPS_EP808__
239
240 #elif defined (__dsPIC33CH64MP202S1__) || defined (__dsPIC33CH128MP202S1__)
241 #define __P33SMPS_CH202__
242 #elif defined (__dsPIC33CH64MP202__) || defined (__dsPIC33CH128MP202__)
243 #define __P33SMPS_CH202__
244 #elif defined (__dsPIC33CH64MP203S1__) || defined (__dsPIC33CH128MP203S1__)
245 #define __P33SMPS_CH203__
246 #elif defined (__dsPIC33CH64MP203__) || defined (__dsPIC33CH128MP203__)
247 #define __P33SMPS_CH203__
248 #elif defined (__dsPIC33CH64MP205S1__) || defined (__dsPIC33CH128MP205S1__)
249 #define __P33SMPS_CH205__
250 #elif defined (__dsPIC33CH64MP205__) || defined (__dsPIC33CH128MP205__)
251 #define __P33SMPS_CH205__
252 #elif defined (__dsPIC33CH256MP205S1__) || defined (__dsPIC33CH512MP205S1__)
253 #define __P33SMPS_CH205__
254 #elif defined (__dsPIC33CH256MP205__) || defined (__dsPIC33CH512MP205__)
255 #define __P33SMPS_CH205__
256 #elif defined (__dsPIC33CH64MP206S1__) || defined (__dsPIC33CH128MP206S1__)
257 #define __P33SMPS_CH206__
258 #elif defined (__dsPIC33CH64MP206__) || defined (__dsPIC33CH128MP206__)
259 #define __P33SMPS_CH206__
260 #elif defined (__dsPIC33CH256MP206S1__) || defined (__dsPIC33CH512MP206S1__)
261 #define __P33SMPS_CH206__
262 #elif defined (__dsPIC33CH256MP206__) || defined (__dsPIC33CH512MP206__)
263 #define __P33SMPS_CH206__
264 #elif defined (__dsPIC33CH64MP208S1__) || defined (__dsPIC33CH128MP208S1__)
265 #define __P33SMPS_CH208__
266 #elif defined (__dsPIC33CH64MP208__) || defined (__dsPIC33CH128MP208__)
267 #define __P33SMPS_CH208__
268 #elif defined (__dsPIC33CH256MP208S1__) || defined (__dsPIC33CH512MP208S1__)
269 #define __P33SMPS_CH208__
270 #elif defined (__dsPIC33CH256MP208__) || defined (__dsPIC33CH512MP208__)
271 #define __P33SMPS_CH208__
272
273 #elif defined (__dsPIC33CH64MP502S1__) || defined (__dsPIC33CH128MP502S1__)
274 #define __P33SMPS_CH502__
275 #elif defined (__dsPIC33CH64MP502__) || defined (__dsPIC33CH128MP502__)
276 #define __P33SMPS_CH502__
277 #elif defined (__dsPIC33CH64MP503S1__) || defined (__dsPIC33CH128MP503S1__)
278 #define __P33SMPS_CH503__
279 #elif defined (__dsPIC33CH64MP503__) || defined (__dsPIC33CH128MP503__)
280 #define __P33SMPS_CH503__
281 #elif defined (__dsPIC33CH64MP505S1__) || defined (__dsPIC33CH128MP505S1__)
282 #define __P33SMPS_CH505__
283 #elif defined (__dsPIC33CH64MP505__) || defined (__dsPIC33CH128MP505__)
284 #define __P33SMPS_CH505__
285 #elif defined (__dsPIC33CH256MP505S1__) || defined (__dsPIC33CH512MP505S1__)
286 #define __P33SMPS_CH505__
287 #elif defined (__dsPIC33CH256MP505__) || defined (__dsPIC33CH512MP505__)
288 #define __P33SMPS_CH505__
289 #elif defined (__dsPIC33CH64MP506S1__) || defined (__dsPIC33CH128MP506S1__)
290 #define __P33SMPS_CH506S1__
291 #elif defined (__dsPIC33CH64MP506__) || defined (__dsPIC33CH128MP506__)
292 #define __P33SMPS_CH506__
293 #elif defined (__dsPIC33CH256MP506S1__) || defined (__dsPIC33CH512MP506S1__)
294 #define __P33SMPS_CH506S1__
295 #elif defined (__dsPIC33CH256MP506__) || defined (__dsPIC33CH512MP506__)
296 #define __P33SMPS_CH506__
297 #elif defined (__dsPIC33CH64MP508S1__) || defined (__dsPIC33CH128MP508S1__)
298 #define __P33SMPS_CH508__
299 #elif defined (__dsPIC33CH64MP508__) || defined (__dsPIC33CH128MP508__)
300 #define __P33SMPS_CH508__
301 #elif defined (__dsPIC33CH256MP508S1__) || defined (__dsPIC33CH512MP508S1__)
302 #define __P33SMPS_CH508__
303 #elif defined (__dsPIC33CH256MP508__) || defined (__dsPIC33CH512MP508__)
304 #define __P33SMPS_CH508__
305
306 #elif defined (__dsPIC33CK32MP102__) || defined (__dsPIC33CK64MP102__)
307 #define __P33SMPS_CK102__
308 #elif defined (__dsPIC33CK32MP103__) || defined (__dsPIC33CK64MP103__)
309 #define __P33SMPS_CK103__
310 #elif defined (__dsPIC33CK32MP105__) || defined (__dsPIC33CK64MP105__)
311 #define __P33SMPS_CK105__
312
313 #elif defined (__dsPIC33CK32MP502__) || defined (__dsPIC33CK64MP502__) || defined (__dsPIC33CK128MP502__) || defined (__dsPIC33CK256MP502__)
314 #define __P33SMPS_CK502__
315 #elif defined (__dsPIC33CK32MP503__) || defined (__dsPIC33CK64MP503__) || defined (__dsPIC33CK128MP503__) || defined (__dsPIC33CK256MP503__)
316 #define __P33SMPS_CK503__
317 #elif defined (__dsPIC33CK32MP505__) || defined (__dsPIC33CK64MP505__) || defined (__dsPIC33CK128MP505__) || defined (__dsPIC33CK256MP505__)
318 #define __P33SMPS_CK505__
319 #elif defined (__dsPIC33CK32MP506__) || defined (__dsPIC33CK64MP506__) || defined (__dsPIC33CK128MP506__) || defined (__dsPIC33CK256MP506__)
320 #define __P33SMPS_CK506__
321 #elif defined (__dsPIC33CK64MP508__) || defined (__dsPIC33CK128MP508__) || defined (__dsPIC33CK256MP508__)
322 #define __P33SMPS_CK508__
323 #else
324 #pragma message "selected device not supported by peripheral driver libraries"
325 #endif
326
327
328
329 #endif /* _MCAL_P33_SMPS_DEVICE_DEFINITION_H_ */
330