pwm.h
Go to the documentation of this file.
1 
31 /*
32  * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
33  */
34 
35 #ifndef _SAME70_PWM_COMPONENT_
36 #define _SAME70_PWM_COMPONENT_
37 
38 /* ============================================================================= */
40 /* ============================================================================= */
43 
44 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
45 
46 typedef struct {
47  __IO uint32_t PWM_CMR;
48  __IO uint32_t PWM_CDTY;
49  __O uint32_t PWM_CDTYUPD;
50  __IO uint32_t PWM_CPRD;
51  __O uint32_t PWM_CPRDUPD;
52  __I uint32_t PWM_CCNT;
53  __IO uint32_t PWM_DT;
54  __O uint32_t PWM_DTUPD;
55 } PwmCh_num;
57 typedef struct {
58  __IO uint32_t PWM_CMPV;
59  __O uint32_t PWM_CMPVUPD;
60  __IO uint32_t PWM_CMPM;
61  __O uint32_t PWM_CMPMUPD;
62 } PwmCmp;
64 #define PWMCMP_NUMBER 8
65 #define PWMCH_NUM_NUMBER 4
66 typedef struct {
67  __IO uint32_t PWM_CLK;
68  __O uint32_t PWM_ENA;
69  __O uint32_t PWM_DIS;
70  __I uint32_t PWM_SR;
71  __O uint32_t PWM_IER1;
72  __O uint32_t PWM_IDR1;
73  __I uint32_t PWM_IMR1;
74  __I uint32_t PWM_ISR1;
75  __IO uint32_t PWM_SCM;
76  __O uint32_t PWM_DMAR;
77  __IO uint32_t PWM_SCUC;
78  __IO uint32_t PWM_SCUP;
79  __O uint32_t PWM_SCUPUPD;
80  __O uint32_t PWM_IER2;
81  __O uint32_t PWM_IDR2;
82  __I uint32_t PWM_IMR2;
83  __I uint32_t PWM_ISR2;
84  __IO uint32_t PWM_OOV;
85  __IO uint32_t PWM_OS;
86  __O uint32_t PWM_OSS;
87  __O uint32_t PWM_OSC;
88  __O uint32_t PWM_OSSUPD;
89  __O uint32_t PWM_OSCUPD;
90  __IO uint32_t PWM_FMR;
91  __I uint32_t PWM_FSR;
92  __O uint32_t PWM_FCR;
93  __IO uint32_t PWM_FPV1;
94  __IO uint32_t PWM_FPE;
95  __I uint32_t Reserved1[3];
96  __IO uint32_t PWM_ELMR[8];
97  __I uint32_t Reserved2[1];
98  __IO uint32_t PWM_SSPR;
99  __O uint32_t PWM_SSPUP;
100  __I uint32_t Reserved3[2];
101  __IO uint32_t PWM_SMMR;
102  __I uint32_t Reserved4[3];
103  __IO uint32_t PWM_FPV2;
104  __I uint32_t Reserved5[8];
105  __O uint32_t PWM_WPCR;
106  __I uint32_t PWM_WPSR;
107  __I uint32_t Reserved6[4];
108  __I uint32_t PWM_VERSION;
109  __I uint32_t Reserved7[12];
111  __I uint32_t Reserved8[20];
113  __I uint32_t Reserved9[96];
114  __O uint32_t PWM_CMUPD0;
115  __I uint32_t Reserved10[7];
116  __O uint32_t PWM_CMUPD1;
117  __I uint32_t Reserved11[2];
118  __IO uint32_t PWM_ETRG1;
119  __IO uint32_t PWM_LEBR1;
120  __I uint32_t Reserved12[3];
121  __O uint32_t PWM_CMUPD2;
122  __I uint32_t Reserved13[2];
123  __IO uint32_t PWM_ETRG2;
124  __IO uint32_t PWM_LEBR2;
125  __I uint32_t Reserved14[3];
126  __O uint32_t PWM_CMUPD3;
127 } Pwm;
128 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
129 /* -------- PWM_CLK : (PWM Offset: 0x00) PWM Clock Register -------- */
130 #define PWM_CLK_DIVA_Pos 0
131 #define PWM_CLK_DIVA_Msk (0xffu << PWM_CLK_DIVA_Pos)
132 #define PWM_CLK_DIVA(value) ((PWM_CLK_DIVA_Msk & ((value) << PWM_CLK_DIVA_Pos)))
133 #define PWM_CLK_DIVA_CLKA_POFF (0x0u << 0)
134 #define PWM_CLK_DIVA_PREA (0x1u << 0)
135 #define PWM_CLK_PREA_Pos 8
136 #define PWM_CLK_PREA_Msk (0xfu << PWM_CLK_PREA_Pos)
137 #define PWM_CLK_PREA(value) ((PWM_CLK_PREA_Msk & ((value) << PWM_CLK_PREA_Pos)))
138 #define PWM_CLK_PREA_CLK (0x0u << 8)
139 #define PWM_CLK_PREA_CLK_DIV2 (0x1u << 8)
140 #define PWM_CLK_PREA_CLK_DIV4 (0x2u << 8)
141 #define PWM_CLK_PREA_CLK_DIV8 (0x3u << 8)
142 #define PWM_CLK_PREA_CLK_DIV16 (0x4u << 8)
143 #define PWM_CLK_PREA_CLK_DIV32 (0x5u << 8)
144 #define PWM_CLK_PREA_CLK_DIV64 (0x6u << 8)
145 #define PWM_CLK_PREA_CLK_DIV128 (0x7u << 8)
146 #define PWM_CLK_PREA_CLK_DIV256 (0x8u << 8)
147 #define PWM_CLK_PREA_CLK_DIV512 (0x9u << 8)
148 #define PWM_CLK_PREA_CLK_DIV1024 (0xAu << 8)
149 #define PWM_CLK_DIVB_Pos 16
150 #define PWM_CLK_DIVB_Msk (0xffu << PWM_CLK_DIVB_Pos)
151 #define PWM_CLK_DIVB(value) ((PWM_CLK_DIVB_Msk & ((value) << PWM_CLK_DIVB_Pos)))
152 #define PWM_CLK_DIVB_CLKB_POFF (0x0u << 16)
153 #define PWM_CLK_DIVB_PREB (0x1u << 16)
154 #define PWM_CLK_PREB_Pos 24
155 #define PWM_CLK_PREB_Msk (0xfu << PWM_CLK_PREB_Pos)
156 #define PWM_CLK_PREB(value) ((PWM_CLK_PREB_Msk & ((value) << PWM_CLK_PREB_Pos)))
157 #define PWM_CLK_PREB_CLK (0x0u << 24)
158 #define PWM_CLK_PREB_CLK_DIV2 (0x1u << 24)
159 #define PWM_CLK_PREB_CLK_DIV4 (0x2u << 24)
160 #define PWM_CLK_PREB_CLK_DIV8 (0x3u << 24)
161 #define PWM_CLK_PREB_CLK_DIV16 (0x4u << 24)
162 #define PWM_CLK_PREB_CLK_DIV32 (0x5u << 24)
163 #define PWM_CLK_PREB_CLK_DIV64 (0x6u << 24)
164 #define PWM_CLK_PREB_CLK_DIV128 (0x7u << 24)
165 #define PWM_CLK_PREB_CLK_DIV256 (0x8u << 24)
166 #define PWM_CLK_PREB_CLK_DIV512 (0x9u << 24)
167 #define PWM_CLK_PREB_CLK_DIV1024 (0xAu << 24)
168 /* -------- PWM_ENA : (PWM Offset: 0x04) PWM Enable Register -------- */
169 #define PWM_ENA_CHID0 (0x1u << 0)
170 #define PWM_ENA_CHID1 (0x1u << 1)
171 #define PWM_ENA_CHID2 (0x1u << 2)
172 #define PWM_ENA_CHID3 (0x1u << 3)
173 /* -------- PWM_DIS : (PWM Offset: 0x08) PWM Disable Register -------- */
174 #define PWM_DIS_CHID0 (0x1u << 0)
175 #define PWM_DIS_CHID1 (0x1u << 1)
176 #define PWM_DIS_CHID2 (0x1u << 2)
177 #define PWM_DIS_CHID3 (0x1u << 3)
178 /* -------- PWM_SR : (PWM Offset: 0x0C) PWM Status Register -------- */
179 #define PWM_SR_CHID0 (0x1u << 0)
180 #define PWM_SR_CHID1 (0x1u << 1)
181 #define PWM_SR_CHID2 (0x1u << 2)
182 #define PWM_SR_CHID3 (0x1u << 3)
183 /* -------- PWM_IER1 : (PWM Offset: 0x10) PWM Interrupt Enable Register 1 -------- */
184 #define PWM_IER1_CHID0 (0x1u << 0)
185 #define PWM_IER1_CHID1 (0x1u << 1)
186 #define PWM_IER1_CHID2 (0x1u << 2)
187 #define PWM_IER1_CHID3 (0x1u << 3)
188 #define PWM_IER1_FCHID0 (0x1u << 16)
189 #define PWM_IER1_FCHID1 (0x1u << 17)
190 #define PWM_IER1_FCHID2 (0x1u << 18)
191 #define PWM_IER1_FCHID3 (0x1u << 19)
192 /* -------- PWM_IDR1 : (PWM Offset: 0x14) PWM Interrupt Disable Register 1 -------- */
193 #define PWM_IDR1_CHID0 (0x1u << 0)
194 #define PWM_IDR1_CHID1 (0x1u << 1)
195 #define PWM_IDR1_CHID2 (0x1u << 2)
196 #define PWM_IDR1_CHID3 (0x1u << 3)
197 #define PWM_IDR1_FCHID0 (0x1u << 16)
198 #define PWM_IDR1_FCHID1 (0x1u << 17)
199 #define PWM_IDR1_FCHID2 (0x1u << 18)
200 #define PWM_IDR1_FCHID3 (0x1u << 19)
201 /* -------- PWM_IMR1 : (PWM Offset: 0x18) PWM Interrupt Mask Register 1 -------- */
202 #define PWM_IMR1_CHID0 (0x1u << 0)
203 #define PWM_IMR1_CHID1 (0x1u << 1)
204 #define PWM_IMR1_CHID2 (0x1u << 2)
205 #define PWM_IMR1_CHID3 (0x1u << 3)
206 #define PWM_IMR1_FCHID0 (0x1u << 16)
207 #define PWM_IMR1_FCHID1 (0x1u << 17)
208 #define PWM_IMR1_FCHID2 (0x1u << 18)
209 #define PWM_IMR1_FCHID3 (0x1u << 19)
210 /* -------- PWM_ISR1 : (PWM Offset: 0x1C) PWM Interrupt Status Register 1 -------- */
211 #define PWM_ISR1_CHID0 (0x1u << 0)
212 #define PWM_ISR1_CHID1 (0x1u << 1)
213 #define PWM_ISR1_CHID2 (0x1u << 2)
214 #define PWM_ISR1_CHID3 (0x1u << 3)
215 #define PWM_ISR1_FCHID0 (0x1u << 16)
216 #define PWM_ISR1_FCHID1 (0x1u << 17)
217 #define PWM_ISR1_FCHID2 (0x1u << 18)
218 #define PWM_ISR1_FCHID3 (0x1u << 19)
219 /* -------- PWM_SCM : (PWM Offset: 0x20) PWM Sync Channels Mode Register -------- */
220 #define PWM_SCM_SYNC0 (0x1u << 0)
221 #define PWM_SCM_SYNC1 (0x1u << 1)
222 #define PWM_SCM_SYNC2 (0x1u << 2)
223 #define PWM_SCM_SYNC3 (0x1u << 3)
224 #define PWM_SCM_UPDM_Pos 16
225 #define PWM_SCM_UPDM_Msk (0x3u << PWM_SCM_UPDM_Pos)
226 #define PWM_SCM_UPDM(value) ((PWM_SCM_UPDM_Msk & ((value) << PWM_SCM_UPDM_Pos)))
227 #define PWM_SCM_UPDM_MODE0 (0x0u << 16)
228 #define PWM_SCM_UPDM_MODE1 (0x1u << 16)
229 #define PWM_SCM_UPDM_MODE2 (0x2u << 16)
230 #define PWM_SCM_PTRM (0x1u << 20)
231 #define PWM_SCM_PTRCS_Pos 21
232 #define PWM_SCM_PTRCS_Msk (0x7u << PWM_SCM_PTRCS_Pos)
233 #define PWM_SCM_PTRCS(value) ((PWM_SCM_PTRCS_Msk & ((value) << PWM_SCM_PTRCS_Pos)))
234 /* -------- PWM_DMAR : (PWM Offset: 0x24) PWM DMA Register -------- */
235 #define PWM_DMAR_DMADUTY_Pos 0
236 #define PWM_DMAR_DMADUTY_Msk (0xffffffu << PWM_DMAR_DMADUTY_Pos)
237 #define PWM_DMAR_DMADUTY(value) ((PWM_DMAR_DMADUTY_Msk & ((value) << PWM_DMAR_DMADUTY_Pos)))
238 /* -------- PWM_SCUC : (PWM Offset: 0x28) PWM Sync Channels Update Control Register -------- */
239 #define PWM_SCUC_UPDULOCK (0x1u << 0)
240 /* -------- PWM_SCUP : (PWM Offset: 0x2C) PWM Sync Channels Update Period Register -------- */
241 #define PWM_SCUP_UPR_Pos 0
242 #define PWM_SCUP_UPR_Msk (0xfu << PWM_SCUP_UPR_Pos)
243 #define PWM_SCUP_UPR(value) ((PWM_SCUP_UPR_Msk & ((value) << PWM_SCUP_UPR_Pos)))
244 #define PWM_SCUP_UPRCNT_Pos 4
245 #define PWM_SCUP_UPRCNT_Msk (0xfu << PWM_SCUP_UPRCNT_Pos)
246 #define PWM_SCUP_UPRCNT(value) ((PWM_SCUP_UPRCNT_Msk & ((value) << PWM_SCUP_UPRCNT_Pos)))
247 /* -------- PWM_SCUPUPD : (PWM Offset: 0x30) PWM Sync Channels Update Period Update Register -------- */
248 #define PWM_SCUPUPD_UPRUPD_Pos 0
249 #define PWM_SCUPUPD_UPRUPD_Msk (0xfu << PWM_SCUPUPD_UPRUPD_Pos)
250 #define PWM_SCUPUPD_UPRUPD(value) ((PWM_SCUPUPD_UPRUPD_Msk & ((value) << PWM_SCUPUPD_UPRUPD_Pos)))
251 /* -------- PWM_IER2 : (PWM Offset: 0x34) PWM Interrupt Enable Register 2 -------- */
252 #define PWM_IER2_WRDY (0x1u << 0)
253 #define PWM_IER2_UNRE (0x1u << 3)
254 #define PWM_IER2_CMPM0 (0x1u << 8)
255 #define PWM_IER2_CMPM1 (0x1u << 9)
256 #define PWM_IER2_CMPM2 (0x1u << 10)
257 #define PWM_IER2_CMPM3 (0x1u << 11)
258 #define PWM_IER2_CMPM4 (0x1u << 12)
259 #define PWM_IER2_CMPM5 (0x1u << 13)
260 #define PWM_IER2_CMPM6 (0x1u << 14)
261 #define PWM_IER2_CMPM7 (0x1u << 15)
262 #define PWM_IER2_CMPU0 (0x1u << 16)
263 #define PWM_IER2_CMPU1 (0x1u << 17)
264 #define PWM_IER2_CMPU2 (0x1u << 18)
265 #define PWM_IER2_CMPU3 (0x1u << 19)
266 #define PWM_IER2_CMPU4 (0x1u << 20)
267 #define PWM_IER2_CMPU5 (0x1u << 21)
268 #define PWM_IER2_CMPU6 (0x1u << 22)
269 #define PWM_IER2_CMPU7 (0x1u << 23)
270 /* -------- PWM_IDR2 : (PWM Offset: 0x38) PWM Interrupt Disable Register 2 -------- */
271 #define PWM_IDR2_WRDY (0x1u << 0)
272 #define PWM_IDR2_UNRE (0x1u << 3)
273 #define PWM_IDR2_CMPM0 (0x1u << 8)
274 #define PWM_IDR2_CMPM1 (0x1u << 9)
275 #define PWM_IDR2_CMPM2 (0x1u << 10)
276 #define PWM_IDR2_CMPM3 (0x1u << 11)
277 #define PWM_IDR2_CMPM4 (0x1u << 12)
278 #define PWM_IDR2_CMPM5 (0x1u << 13)
279 #define PWM_IDR2_CMPM6 (0x1u << 14)
280 #define PWM_IDR2_CMPM7 (0x1u << 15)
281 #define PWM_IDR2_CMPU0 (0x1u << 16)
282 #define PWM_IDR2_CMPU1 (0x1u << 17)
283 #define PWM_IDR2_CMPU2 (0x1u << 18)
284 #define PWM_IDR2_CMPU3 (0x1u << 19)
285 #define PWM_IDR2_CMPU4 (0x1u << 20)
286 #define PWM_IDR2_CMPU5 (0x1u << 21)
287 #define PWM_IDR2_CMPU6 (0x1u << 22)
288 #define PWM_IDR2_CMPU7 (0x1u << 23)
289 /* -------- PWM_IMR2 : (PWM Offset: 0x3C) PWM Interrupt Mask Register 2 -------- */
290 #define PWM_IMR2_WRDY (0x1u << 0)
291 #define PWM_IMR2_UNRE (0x1u << 3)
292 #define PWM_IMR2_CMPM0 (0x1u << 8)
293 #define PWM_IMR2_CMPM1 (0x1u << 9)
294 #define PWM_IMR2_CMPM2 (0x1u << 10)
295 #define PWM_IMR2_CMPM3 (0x1u << 11)
296 #define PWM_IMR2_CMPM4 (0x1u << 12)
297 #define PWM_IMR2_CMPM5 (0x1u << 13)
298 #define PWM_IMR2_CMPM6 (0x1u << 14)
299 #define PWM_IMR2_CMPM7 (0x1u << 15)
300 #define PWM_IMR2_CMPU0 (0x1u << 16)
301 #define PWM_IMR2_CMPU1 (0x1u << 17)
302 #define PWM_IMR2_CMPU2 (0x1u << 18)
303 #define PWM_IMR2_CMPU3 (0x1u << 19)
304 #define PWM_IMR2_CMPU4 (0x1u << 20)
305 #define PWM_IMR2_CMPU5 (0x1u << 21)
306 #define PWM_IMR2_CMPU6 (0x1u << 22)
307 #define PWM_IMR2_CMPU7 (0x1u << 23)
308 /* -------- PWM_ISR2 : (PWM Offset: 0x40) PWM Interrupt Status Register 2 -------- */
309 #define PWM_ISR2_WRDY (0x1u << 0)
310 #define PWM_ISR2_UNRE (0x1u << 3)
311 #define PWM_ISR2_CMPM0 (0x1u << 8)
312 #define PWM_ISR2_CMPM1 (0x1u << 9)
313 #define PWM_ISR2_CMPM2 (0x1u << 10)
314 #define PWM_ISR2_CMPM3 (0x1u << 11)
315 #define PWM_ISR2_CMPM4 (0x1u << 12)
316 #define PWM_ISR2_CMPM5 (0x1u << 13)
317 #define PWM_ISR2_CMPM6 (0x1u << 14)
318 #define PWM_ISR2_CMPM7 (0x1u << 15)
319 #define PWM_ISR2_CMPU0 (0x1u << 16)
320 #define PWM_ISR2_CMPU1 (0x1u << 17)
321 #define PWM_ISR2_CMPU2 (0x1u << 18)
322 #define PWM_ISR2_CMPU3 (0x1u << 19)
323 #define PWM_ISR2_CMPU4 (0x1u << 20)
324 #define PWM_ISR2_CMPU5 (0x1u << 21)
325 #define PWM_ISR2_CMPU6 (0x1u << 22)
326 #define PWM_ISR2_CMPU7 (0x1u << 23)
327 /* -------- PWM_OOV : (PWM Offset: 0x44) PWM Output Override Value Register -------- */
328 #define PWM_OOV_OOVH0 (0x1u << 0)
329 #define PWM_OOV_OOVH1 (0x1u << 1)
330 #define PWM_OOV_OOVH2 (0x1u << 2)
331 #define PWM_OOV_OOVH3 (0x1u << 3)
332 #define PWM_OOV_OOVL0 (0x1u << 16)
333 #define PWM_OOV_OOVL1 (0x1u << 17)
334 #define PWM_OOV_OOVL2 (0x1u << 18)
335 #define PWM_OOV_OOVL3 (0x1u << 19)
336 /* -------- PWM_OS : (PWM Offset: 0x48) PWM Output Selection Register -------- */
337 #define PWM_OS_OSH0 (0x1u << 0)
338 #define PWM_OS_OSH1 (0x1u << 1)
339 #define PWM_OS_OSH2 (0x1u << 2)
340 #define PWM_OS_OSH3 (0x1u << 3)
341 #define PWM_OS_OSL0 (0x1u << 16)
342 #define PWM_OS_OSL1 (0x1u << 17)
343 #define PWM_OS_OSL2 (0x1u << 18)
344 #define PWM_OS_OSL3 (0x1u << 19)
345 /* -------- PWM_OSS : (PWM Offset: 0x4C) PWM Output Selection Set Register -------- */
346 #define PWM_OSS_OSSH0 (0x1u << 0)
347 #define PWM_OSS_OSSH1 (0x1u << 1)
348 #define PWM_OSS_OSSH2 (0x1u << 2)
349 #define PWM_OSS_OSSH3 (0x1u << 3)
350 #define PWM_OSS_OSSL0 (0x1u << 16)
351 #define PWM_OSS_OSSL1 (0x1u << 17)
352 #define PWM_OSS_OSSL2 (0x1u << 18)
353 #define PWM_OSS_OSSL3 (0x1u << 19)
354 /* -------- PWM_OSC : (PWM Offset: 0x50) PWM Output Selection Clear Register -------- */
355 #define PWM_OSC_OSCH0 (0x1u << 0)
356 #define PWM_OSC_OSCH1 (0x1u << 1)
357 #define PWM_OSC_OSCH2 (0x1u << 2)
358 #define PWM_OSC_OSCH3 (0x1u << 3)
359 #define PWM_OSC_OSCL0 (0x1u << 16)
360 #define PWM_OSC_OSCL1 (0x1u << 17)
361 #define PWM_OSC_OSCL2 (0x1u << 18)
362 #define PWM_OSC_OSCL3 (0x1u << 19)
363 /* -------- PWM_OSSUPD : (PWM Offset: 0x54) PWM Output Selection Set Update Register -------- */
364 #define PWM_OSSUPD_OSSUPH0 (0x1u << 0)
365 #define PWM_OSSUPD_OSSUPH1 (0x1u << 1)
366 #define PWM_OSSUPD_OSSUPH2 (0x1u << 2)
367 #define PWM_OSSUPD_OSSUPH3 (0x1u << 3)
368 #define PWM_OSSUPD_OSSUPL0 (0x1u << 16)
369 #define PWM_OSSUPD_OSSUPL1 (0x1u << 17)
370 #define PWM_OSSUPD_OSSUPL2 (0x1u << 18)
371 #define PWM_OSSUPD_OSSUPL3 (0x1u << 19)
372 /* -------- PWM_OSCUPD : (PWM Offset: 0x58) PWM Output Selection Clear Update Register -------- */
373 #define PWM_OSCUPD_OSCUPH0 (0x1u << 0)
374 #define PWM_OSCUPD_OSCUPH1 (0x1u << 1)
375 #define PWM_OSCUPD_OSCUPH2 (0x1u << 2)
376 #define PWM_OSCUPD_OSCUPH3 (0x1u << 3)
377 #define PWM_OSCUPD_OSCUPL0 (0x1u << 16)
378 #define PWM_OSCUPD_OSCUPL1 (0x1u << 17)
379 #define PWM_OSCUPD_OSCUPL2 (0x1u << 18)
380 #define PWM_OSCUPD_OSCUPL3 (0x1u << 19)
381 /* -------- PWM_FMR : (PWM Offset: 0x5C) PWM Fault Mode Register -------- */
382 #define PWM_FMR_FPOL_Pos 0
383 #define PWM_FMR_FPOL_Msk (0xffu << PWM_FMR_FPOL_Pos)
384 #define PWM_FMR_FPOL(value) ((PWM_FMR_FPOL_Msk & ((value) << PWM_FMR_FPOL_Pos)))
385 #define PWM_FMR_FMOD_Pos 8
386 #define PWM_FMR_FMOD_Msk (0xffu << PWM_FMR_FMOD_Pos)
387 #define PWM_FMR_FMOD(value) ((PWM_FMR_FMOD_Msk & ((value) << PWM_FMR_FMOD_Pos)))
388 #define PWM_FMR_FFIL_Pos 16
389 #define PWM_FMR_FFIL_Msk (0xffu << PWM_FMR_FFIL_Pos)
390 #define PWM_FMR_FFIL(value) ((PWM_FMR_FFIL_Msk & ((value) << PWM_FMR_FFIL_Pos)))
391 /* -------- PWM_FSR : (PWM Offset: 0x60) PWM Fault Status Register -------- */
392 #define PWM_FSR_FIV_Pos 0
393 #define PWM_FSR_FIV_Msk (0xffu << PWM_FSR_FIV_Pos)
394 #define PWM_FSR_FS_Pos 8
395 #define PWM_FSR_FS_Msk (0xffu << PWM_FSR_FS_Pos)
396 /* -------- PWM_FCR : (PWM Offset: 0x64) PWM Fault Clear Register -------- */
397 #define PWM_FCR_FCLR_Pos 0
398 #define PWM_FCR_FCLR_Msk (0xffu << PWM_FCR_FCLR_Pos)
399 #define PWM_FCR_FCLR(value) ((PWM_FCR_FCLR_Msk & ((value) << PWM_FCR_FCLR_Pos)))
400 /* -------- PWM_FPV1 : (PWM Offset: 0x68) PWM Fault Protection Value Register 1 -------- */
401 #define PWM_FPV1_FPVH0 (0x1u << 0)
402 #define PWM_FPV1_FPVH1 (0x1u << 1)
403 #define PWM_FPV1_FPVH2 (0x1u << 2)
404 #define PWM_FPV1_FPVH3 (0x1u << 3)
405 #define PWM_FPV1_FPVL0 (0x1u << 16)
406 #define PWM_FPV1_FPVL1 (0x1u << 17)
407 #define PWM_FPV1_FPVL2 (0x1u << 18)
408 #define PWM_FPV1_FPVL3 (0x1u << 19)
409 /* -------- PWM_FPE : (PWM Offset: 0x6C) PWM Fault Protection Enable Register -------- */
410 #define PWM_FPE_FPE0_Pos 0
411 #define PWM_FPE_FPE0_Msk (0xffu << PWM_FPE_FPE0_Pos)
412 #define PWM_FPE_FPE0(value) ((PWM_FPE_FPE0_Msk & ((value) << PWM_FPE_FPE0_Pos)))
413 #define PWM_FPE_FPE1_Pos 8
414 #define PWM_FPE_FPE1_Msk (0xffu << PWM_FPE_FPE1_Pos)
415 #define PWM_FPE_FPE1(value) ((PWM_FPE_FPE1_Msk & ((value) << PWM_FPE_FPE1_Pos)))
416 #define PWM_FPE_FPE2_Pos 16
417 #define PWM_FPE_FPE2_Msk (0xffu << PWM_FPE_FPE2_Pos)
418 #define PWM_FPE_FPE2(value) ((PWM_FPE_FPE2_Msk & ((value) << PWM_FPE_FPE2_Pos)))
419 #define PWM_FPE_FPE3_Pos 24
420 #define PWM_FPE_FPE3_Msk (0xffu << PWM_FPE_FPE3_Pos)
421 #define PWM_FPE_FPE3(value) ((PWM_FPE_FPE3_Msk & ((value) << PWM_FPE_FPE3_Pos)))
422 /* -------- PWM_ELMR[8] : (PWM Offset: 0x7C) PWM Event Line 0 Mode Register -------- */
423 #define PWM_ELMR_CSEL0 (0x1u << 0)
424 #define PWM_ELMR_CSEL1 (0x1u << 1)
425 #define PWM_ELMR_CSEL2 (0x1u << 2)
426 #define PWM_ELMR_CSEL3 (0x1u << 3)
427 #define PWM_ELMR_CSEL4 (0x1u << 4)
428 #define PWM_ELMR_CSEL5 (0x1u << 5)
429 #define PWM_ELMR_CSEL6 (0x1u << 6)
430 #define PWM_ELMR_CSEL7 (0x1u << 7)
431 /* -------- PWM_SSPR : (PWM Offset: 0xA0) PWM Spread Spectrum Register -------- */
432 #define PWM_SSPR_SPRD_Pos 0
433 #define PWM_SSPR_SPRD_Msk (0xffffffu << PWM_SSPR_SPRD_Pos)
434 #define PWM_SSPR_SPRD(value) ((PWM_SSPR_SPRD_Msk & ((value) << PWM_SSPR_SPRD_Pos)))
435 #define PWM_SSPR_SPRDM (0x1u << 24)
436 /* -------- PWM_SSPUP : (PWM Offset: 0xA4) PWM Spread Spectrum Update Register -------- */
437 #define PWM_SSPUP_SPRDUP_Pos 0
438 #define PWM_SSPUP_SPRDUP_Msk (0xffffffu << PWM_SSPUP_SPRDUP_Pos)
439 #define PWM_SSPUP_SPRDUP(value) ((PWM_SSPUP_SPRDUP_Msk & ((value) << PWM_SSPUP_SPRDUP_Pos)))
440 /* -------- PWM_SMMR : (PWM Offset: 0xB0) PWM Stepper Motor Mode Register -------- */
441 #define PWM_SMMR_GCEN0 (0x1u << 0)
442 #define PWM_SMMR_GCEN1 (0x1u << 1)
443 #define PWM_SMMR_DOWN0 (0x1u << 16)
444 #define PWM_SMMR_DOWN1 (0x1u << 17)
445 /* -------- PWM_FPV2 : (PWM Offset: 0xC0) PWM Fault Protection Value 2 Register -------- */
446 #define PWM_FPV2_FPZH0 (0x1u << 0)
447 #define PWM_FPV2_FPZH1 (0x1u << 1)
448 #define PWM_FPV2_FPZH2 (0x1u << 2)
449 #define PWM_FPV2_FPZH3 (0x1u << 3)
450 #define PWM_FPV2_FPZL0 (0x1u << 16)
451 #define PWM_FPV2_FPZL1 (0x1u << 17)
452 #define PWM_FPV2_FPZL2 (0x1u << 18)
453 #define PWM_FPV2_FPZL3 (0x1u << 19)
454 /* -------- PWM_WPCR : (PWM Offset: 0xE4) PWM Write Protection Control Register -------- */
455 #define PWM_WPCR_WPCMD_Pos 0
456 #define PWM_WPCR_WPCMD_Msk (0x3u << PWM_WPCR_WPCMD_Pos)
457 #define PWM_WPCR_WPCMD(value) ((PWM_WPCR_WPCMD_Msk & ((value) << PWM_WPCR_WPCMD_Pos)))
458 #define PWM_WPCR_WPCMD_DISABLE_SW_PROT (0x0u << 0)
459 #define PWM_WPCR_WPCMD_ENABLE_SW_PROT (0x1u << 0)
460 #define PWM_WPCR_WPCMD_ENABLE_HW_PROT (0x2u << 0)
461 #define PWM_WPCR_WPRG0 (0x1u << 2)
462 #define PWM_WPCR_WPRG1 (0x1u << 3)
463 #define PWM_WPCR_WPRG2 (0x1u << 4)
464 #define PWM_WPCR_WPRG3 (0x1u << 5)
465 #define PWM_WPCR_WPRG4 (0x1u << 6)
466 #define PWM_WPCR_WPRG5 (0x1u << 7)
467 #define PWM_WPCR_WPKEY_Pos 8
468 #define PWM_WPCR_WPKEY_Msk (0xffffffu << PWM_WPCR_WPKEY_Pos)
469 #define PWM_WPCR_WPKEY(value) ((PWM_WPCR_WPKEY_Msk & ((value) << PWM_WPCR_WPKEY_Pos)))
470 #define PWM_WPCR_WPKEY_PASSWD (0x50574Du << 8)
471 /* -------- PWM_WPSR : (PWM Offset: 0xE8) PWM Write Protection Status Register -------- */
472 #define PWM_WPSR_WPSWS0 (0x1u << 0)
473 #define PWM_WPSR_WPSWS1 (0x1u << 1)
474 #define PWM_WPSR_WPSWS2 (0x1u << 2)
475 #define PWM_WPSR_WPSWS3 (0x1u << 3)
476 #define PWM_WPSR_WPSWS4 (0x1u << 4)
477 #define PWM_WPSR_WPSWS5 (0x1u << 5)
478 #define PWM_WPSR_WPVS (0x1u << 7)
479 #define PWM_WPSR_WPHWS0 (0x1u << 8)
480 #define PWM_WPSR_WPHWS1 (0x1u << 9)
481 #define PWM_WPSR_WPHWS2 (0x1u << 10)
482 #define PWM_WPSR_WPHWS3 (0x1u << 11)
483 #define PWM_WPSR_WPHWS4 (0x1u << 12)
484 #define PWM_WPSR_WPHWS5 (0x1u << 13)
485 #define PWM_WPSR_WPVSRC_Pos 16
486 #define PWM_WPSR_WPVSRC_Msk (0xffffu << PWM_WPSR_WPVSRC_Pos)
487 /* -------- PWM_VERSION : (PWM Offset: 0xFC) Version Register -------- */
488 #define PWM_VERSION_VERSION_Pos 0
489 #define PWM_VERSION_VERSION_Msk (0xfffu << PWM_VERSION_VERSION_Pos)
490 #define PWM_VERSION_MFN_Pos 16
491 #define PWM_VERSION_MFN_Msk (0x7u << PWM_VERSION_MFN_Pos)
492 /* -------- PWM_CMPV : (PWM Offset: N/A) PWM Comparison 0 Value Register -------- */
493 #define PWM_CMPV_CV_Pos 0
494 #define PWM_CMPV_CV_Msk (0xffffffu << PWM_CMPV_CV_Pos)
495 #define PWM_CMPV_CV(value) ((PWM_CMPV_CV_Msk & ((value) << PWM_CMPV_CV_Pos)))
496 #define PWM_CMPV_CVM (0x1u << 24)
497 /* -------- PWM_CMPVUPD : (PWM Offset: N/A) PWM Comparison 0 Value Update Register -------- */
498 #define PWM_CMPVUPD_CVUPD_Pos 0
499 #define PWM_CMPVUPD_CVUPD_Msk (0xffffffu << PWM_CMPVUPD_CVUPD_Pos)
500 #define PWM_CMPVUPD_CVUPD(value) ((PWM_CMPVUPD_CVUPD_Msk & ((value) << PWM_CMPVUPD_CVUPD_Pos)))
501 #define PWM_CMPVUPD_CVMUPD (0x1u << 24)
502 /* -------- PWM_CMPM : (PWM Offset: N/A) PWM Comparison 0 Mode Register -------- */
503 #define PWM_CMPM_CEN (0x1u << 0)
504 #define PWM_CMPM_CTR_Pos 4
505 #define PWM_CMPM_CTR_Msk (0xfu << PWM_CMPM_CTR_Pos)
506 #define PWM_CMPM_CTR(value) ((PWM_CMPM_CTR_Msk & ((value) << PWM_CMPM_CTR_Pos)))
507 #define PWM_CMPM_CPR_Pos 8
508 #define PWM_CMPM_CPR_Msk (0xfu << PWM_CMPM_CPR_Pos)
509 #define PWM_CMPM_CPR(value) ((PWM_CMPM_CPR_Msk & ((value) << PWM_CMPM_CPR_Pos)))
510 #define PWM_CMPM_CPRCNT_Pos 12
511 #define PWM_CMPM_CPRCNT_Msk (0xfu << PWM_CMPM_CPRCNT_Pos)
512 #define PWM_CMPM_CPRCNT(value) ((PWM_CMPM_CPRCNT_Msk & ((value) << PWM_CMPM_CPRCNT_Pos)))
513 #define PWM_CMPM_CUPR_Pos 16
514 #define PWM_CMPM_CUPR_Msk (0xfu << PWM_CMPM_CUPR_Pos)
515 #define PWM_CMPM_CUPR(value) ((PWM_CMPM_CUPR_Msk & ((value) << PWM_CMPM_CUPR_Pos)))
516 #define PWM_CMPM_CUPRCNT_Pos 20
517 #define PWM_CMPM_CUPRCNT_Msk (0xfu << PWM_CMPM_CUPRCNT_Pos)
518 #define PWM_CMPM_CUPRCNT(value) ((PWM_CMPM_CUPRCNT_Msk & ((value) << PWM_CMPM_CUPRCNT_Pos)))
519 /* -------- PWM_CMPMUPD : (PWM Offset: N/A) PWM Comparison 0 Mode Update Register -------- */
520 #define PWM_CMPMUPD_CENUPD (0x1u << 0)
521 #define PWM_CMPMUPD_CTRUPD_Pos 4
522 #define PWM_CMPMUPD_CTRUPD_Msk (0xfu << PWM_CMPMUPD_CTRUPD_Pos)
523 #define PWM_CMPMUPD_CTRUPD(value) ((PWM_CMPMUPD_CTRUPD_Msk & ((value) << PWM_CMPMUPD_CTRUPD_Pos)))
524 #define PWM_CMPMUPD_CPRUPD_Pos 8
525 #define PWM_CMPMUPD_CPRUPD_Msk (0xfu << PWM_CMPMUPD_CPRUPD_Pos)
526 #define PWM_CMPMUPD_CPRUPD(value) ((PWM_CMPMUPD_CPRUPD_Msk & ((value) << PWM_CMPMUPD_CPRUPD_Pos)))
527 #define PWM_CMPMUPD_CUPRUPD_Pos 16
528 #define PWM_CMPMUPD_CUPRUPD_Msk (0xfu << PWM_CMPMUPD_CUPRUPD_Pos)
529 #define PWM_CMPMUPD_CUPRUPD(value) ((PWM_CMPMUPD_CUPRUPD_Msk & ((value) << PWM_CMPMUPD_CUPRUPD_Pos)))
530 /* -------- PWM_CMR : (PWM Offset: N/A) PWM Channel Mode Register -------- */
531 #define PWM_CMR_CPRE_Pos 0
532 #define PWM_CMR_CPRE_Msk (0xfu << PWM_CMR_CPRE_Pos)
533 #define PWM_CMR_CPRE(value) ((PWM_CMR_CPRE_Msk & ((value) << PWM_CMR_CPRE_Pos)))
534 #define PWM_CMR_CPRE_MCK (0x0u << 0)
535 #define PWM_CMR_CPRE_MCK_DIV_2 (0x1u << 0)
536 #define PWM_CMR_CPRE_MCK_DIV_4 (0x2u << 0)
537 #define PWM_CMR_CPRE_MCK_DIV_8 (0x3u << 0)
538 #define PWM_CMR_CPRE_MCK_DIV_16 (0x4u << 0)
539 #define PWM_CMR_CPRE_MCK_DIV_32 (0x5u << 0)
540 #define PWM_CMR_CPRE_MCK_DIV_64 (0x6u << 0)
541 #define PWM_CMR_CPRE_MCK_DIV_128 (0x7u << 0)
542 #define PWM_CMR_CPRE_MCK_DIV_256 (0x8u << 0)
543 #define PWM_CMR_CPRE_MCK_DIV_512 (0x9u << 0)
544 #define PWM_CMR_CPRE_MCK_DIV_1024 (0xAu << 0)
545 #define PWM_CMR_CPRE_CLKA (0xBu << 0)
546 #define PWM_CMR_CPRE_CLKB (0xCu << 0)
547 #define PWM_CMR_CALG (0x1u << 8)
548 #define PWM_CMR_CPOL (0x1u << 9)
549 #define PWM_CMR_CES (0x1u << 10)
550 #define PWM_CMR_UPDS (0x1u << 11)
551 #define PWM_CMR_DPOLI (0x1u << 12)
552 #define PWM_CMR_TCTS (0x1u << 13)
553 #define PWM_CMR_DTE (0x1u << 16)
554 #define PWM_CMR_DTHI (0x1u << 17)
555 #define PWM_CMR_DTLI (0x1u << 18)
556 #define PWM_CMR_PPM (0x1u << 19)
557 /* -------- PWM_CDTY : (PWM Offset: N/A) PWM Channel Duty Cycle Register -------- */
558 #define PWM_CDTY_CDTY_Pos 0
559 #define PWM_CDTY_CDTY_Msk (0xffffffu << PWM_CDTY_CDTY_Pos)
560 #define PWM_CDTY_CDTY(value) ((PWM_CDTY_CDTY_Msk & ((value) << PWM_CDTY_CDTY_Pos)))
561 /* -------- PWM_CDTYUPD : (PWM Offset: N/A) PWM Channel Duty Cycle Update Register -------- */
562 #define PWM_CDTYUPD_CDTYUPD_Pos 0
563 #define PWM_CDTYUPD_CDTYUPD_Msk (0xffffffu << PWM_CDTYUPD_CDTYUPD_Pos)
564 #define PWM_CDTYUPD_CDTYUPD(value) ((PWM_CDTYUPD_CDTYUPD_Msk & ((value) << PWM_CDTYUPD_CDTYUPD_Pos)))
565 /* -------- PWM_CPRD : (PWM Offset: N/A) PWM Channel Period Register -------- */
566 #define PWM_CPRD_CPRD_Pos 0
567 #define PWM_CPRD_CPRD_Msk (0xffffffu << PWM_CPRD_CPRD_Pos)
568 #define PWM_CPRD_CPRD(value) ((PWM_CPRD_CPRD_Msk & ((value) << PWM_CPRD_CPRD_Pos)))
569 /* -------- PWM_CPRDUPD : (PWM Offset: N/A) PWM Channel Period Update Register -------- */
570 #define PWM_CPRDUPD_CPRDUPD_Pos 0
571 #define PWM_CPRDUPD_CPRDUPD_Msk (0xffffffu << PWM_CPRDUPD_CPRDUPD_Pos)
572 #define PWM_CPRDUPD_CPRDUPD(value) ((PWM_CPRDUPD_CPRDUPD_Msk & ((value) << PWM_CPRDUPD_CPRDUPD_Pos)))
573 /* -------- PWM_CCNT : (PWM Offset: N/A) PWM Channel Counter Register -------- */
574 #define PWM_CCNT_CNT_Pos 0
575 #define PWM_CCNT_CNT_Msk (0xffffffu << PWM_CCNT_CNT_Pos)
576 /* -------- PWM_DT : (PWM Offset: N/A) PWM Channel Dead Time Register -------- */
577 #define PWM_DT_DTH_Pos 0
578 #define PWM_DT_DTH_Msk (0xffffu << PWM_DT_DTH_Pos)
579 #define PWM_DT_DTH(value) ((PWM_DT_DTH_Msk & ((value) << PWM_DT_DTH_Pos)))
580 #define PWM_DT_DTL_Pos 16
581 #define PWM_DT_DTL_Msk (0xffffu << PWM_DT_DTL_Pos)
582 #define PWM_DT_DTL(value) ((PWM_DT_DTL_Msk & ((value) << PWM_DT_DTL_Pos)))
583 /* -------- PWM_DTUPD : (PWM Offset: N/A) PWM Channel Dead Time Update Register -------- */
584 #define PWM_DTUPD_DTHUPD_Pos 0
585 #define PWM_DTUPD_DTHUPD_Msk (0xffffu << PWM_DTUPD_DTHUPD_Pos)
586 #define PWM_DTUPD_DTHUPD(value) ((PWM_DTUPD_DTHUPD_Msk & ((value) << PWM_DTUPD_DTHUPD_Pos)))
587 #define PWM_DTUPD_DTLUPD_Pos 16
588 #define PWM_DTUPD_DTLUPD_Msk (0xffffu << PWM_DTUPD_DTLUPD_Pos)
589 #define PWM_DTUPD_DTLUPD(value) ((PWM_DTUPD_DTLUPD_Msk & ((value) << PWM_DTUPD_DTLUPD_Pos)))
590 /* -------- PWM_CMUPD0 : (PWM Offset: 0x400) PWM Channel Mode Update Register (ch_num = 0) -------- */
591 #define PWM_CMUPD0_CPOLUP (0x1u << 9)
592 #define PWM_CMUPD0_CPOLINVUP (0x1u << 13)
593 /* -------- PWM_CMUPD1 : (PWM Offset: 0x420) PWM Channel Mode Update Register (ch_num = 1) -------- */
594 #define PWM_CMUPD1_CPOLUP (0x1u << 9)
595 #define PWM_CMUPD1_CPOLINVUP (0x1u << 13)
596 /* -------- PWM_ETRG1 : (PWM Offset: 0x42C) PWM External Trigger Register (trg_num = 1) -------- */
597 #define PWM_ETRG1_MAXCNT_Pos 0
598 #define PWM_ETRG1_MAXCNT_Msk (0xffffffu << PWM_ETRG1_MAXCNT_Pos)
599 #define PWM_ETRG1_MAXCNT(value) ((PWM_ETRG1_MAXCNT_Msk & ((value) << PWM_ETRG1_MAXCNT_Pos)))
600 #define PWM_ETRG1_TRGMODE_Pos 24
601 #define PWM_ETRG1_TRGMODE_Msk (0x3u << PWM_ETRG1_TRGMODE_Pos)
602 #define PWM_ETRG1_TRGMODE(value) ((PWM_ETRG1_TRGMODE_Msk & ((value) << PWM_ETRG1_TRGMODE_Pos)))
603 #define PWM_ETRG1_TRGMODE_OFF (0x0u << 24)
604 #define PWM_ETRG1_TRGMODE_MODE1 (0x1u << 24)
605 #define PWM_ETRG1_TRGMODE_MODE2 (0x2u << 24)
606 #define PWM_ETRG1_TRGMODE_MODE3 (0x3u << 24)
607 #define PWM_ETRG1_TRGEDGE (0x1u << 28)
608 #define PWM_ETRG1_TRGEDGE_FALLING_ZERO (0x0u << 28)
609 #define PWM_ETRG1_TRGEDGE_RISING_ONE (0x1u << 28)
610 #define PWM_ETRG1_TRGFILT (0x1u << 29)
611 #define PWM_ETRG1_TRGSRC (0x1u << 30)
612 #define PWM_ETRG1_RFEN (0x1u << 31)
613 /* -------- PWM_LEBR1 : (PWM Offset: 0x430) PWM Leading-Edge Blanking Register (trg_num = 1) -------- */
614 #define PWM_LEBR1_LEBDELAY_Pos 0
615 #define PWM_LEBR1_LEBDELAY_Msk (0x7fu << PWM_LEBR1_LEBDELAY_Pos)
616 #define PWM_LEBR1_LEBDELAY(value) ((PWM_LEBR1_LEBDELAY_Msk & ((value) << PWM_LEBR1_LEBDELAY_Pos)))
617 #define PWM_LEBR1_PWMLFEN (0x1u << 16)
618 #define PWM_LEBR1_PWMLREN (0x1u << 17)
619 #define PWM_LEBR1_PWMHFEN (0x1u << 18)
620 #define PWM_LEBR1_PWMHREN (0x1u << 19)
621 /* -------- PWM_CMUPD2 : (PWM Offset: 0x440) PWM Channel Mode Update Register (ch_num = 2) -------- */
622 #define PWM_CMUPD2_CPOLUP (0x1u << 9)
623 #define PWM_CMUPD2_CPOLINVUP (0x1u << 13)
624 /* -------- PWM_ETRG2 : (PWM Offset: 0x44C) PWM External Trigger Register (trg_num = 2) -------- */
625 #define PWM_ETRG2_MAXCNT_Pos 0
626 #define PWM_ETRG2_MAXCNT_Msk (0xffffffu << PWM_ETRG2_MAXCNT_Pos)
627 #define PWM_ETRG2_MAXCNT(value) ((PWM_ETRG2_MAXCNT_Msk & ((value) << PWM_ETRG2_MAXCNT_Pos)))
628 #define PWM_ETRG2_TRGMODE_Pos 24
629 #define PWM_ETRG2_TRGMODE_Msk (0x3u << PWM_ETRG2_TRGMODE_Pos)
630 #define PWM_ETRG2_TRGMODE(value) ((PWM_ETRG2_TRGMODE_Msk & ((value) << PWM_ETRG2_TRGMODE_Pos)))
631 #define PWM_ETRG2_TRGMODE_OFF (0x0u << 24)
632 #define PWM_ETRG2_TRGMODE_MODE1 (0x1u << 24)
633 #define PWM_ETRG2_TRGMODE_MODE2 (0x2u << 24)
634 #define PWM_ETRG2_TRGMODE_MODE3 (0x3u << 24)
635 #define PWM_ETRG2_TRGEDGE (0x1u << 28)
636 #define PWM_ETRG2_TRGEDGE_FALLING_ZERO (0x0u << 28)
637 #define PWM_ETRG2_TRGEDGE_RISING_ONE (0x1u << 28)
638 #define PWM_ETRG2_TRGFILT (0x1u << 29)
639 #define PWM_ETRG2_TRGSRC (0x1u << 30)
640 #define PWM_ETRG2_RFEN (0x1u << 31)
641 /* -------- PWM_LEBR2 : (PWM Offset: 0x450) PWM Leading-Edge Blanking Register (trg_num = 2) -------- */
642 #define PWM_LEBR2_LEBDELAY_Pos 0
643 #define PWM_LEBR2_LEBDELAY_Msk (0x7fu << PWM_LEBR2_LEBDELAY_Pos)
644 #define PWM_LEBR2_LEBDELAY(value) ((PWM_LEBR2_LEBDELAY_Msk & ((value) << PWM_LEBR2_LEBDELAY_Pos)))
645 #define PWM_LEBR2_PWMLFEN (0x1u << 16)
646 #define PWM_LEBR2_PWMLREN (0x1u << 17)
647 #define PWM_LEBR2_PWMHFEN (0x1u << 18)
648 #define PWM_LEBR2_PWMHREN (0x1u << 19)
649 /* -------- PWM_CMUPD3 : (PWM Offset: 0x460) PWM Channel Mode Update Register (ch_num = 3) -------- */
650 #define PWM_CMUPD3_CPOLUP (0x1u << 9)
651 #define PWM_CMUPD3_CPOLINVUP (0x1u << 13)
654 
655 
656 #endif /* _SAME70_PWM_COMPONENT_ */
__IO uint32_t PWM_ETRG1
(Pwm Offset: 0x42C) PWM External Trigger Register (trg_num = 1)
Definition: pwm.h:118
__O uint32_t PWM_FCR
(Pwm Offset: 0x64) PWM Fault Clear Register
Definition: pwm.h:92
__O uint32_t PWM_DTUPD
(PwmCh_num Offset: 0x1C) PWM Channel Dead Time Update Register
Definition: pwm.h:54
__O uint32_t PWM_IDR1
(Pwm Offset: 0x14) PWM Interrupt Disable Register 1
Definition: pwm.h:72
__IO uint32_t PWM_CMPV
(PwmCmp Offset: 0x0) PWM Comparison 0 Value Register
Definition: pwm.h:58
Definition: pwm.h:66
__O uint32_t PWM_WPCR
(Pwm Offset: 0xE4) PWM Write Protection Control Register
Definition: pwm.h:105
__O uint32_t PWM_CMUPD2
(Pwm Offset: 0x440) PWM Channel Mode Update Register (ch_num = 2)
Definition: pwm.h:121
__I uint32_t PWM_ISR2
(Pwm Offset: 0x40) PWM Interrupt Status Register 2
Definition: pwm.h:83
__O uint32_t PWM_DMAR
(Pwm Offset: 0x24) PWM DMA Register
Definition: pwm.h:76
#define __IO
Definition: core_cm7.h:266
__IO uint32_t PWM_CPRD
(PwmCh_num Offset: 0xC) PWM Channel Period Register
Definition: pwm.h:50
__O uint32_t PWM_ENA
(Pwm Offset: 0x04) PWM Enable Register
Definition: pwm.h:68
__I uint32_t PWM_WPSR
(Pwm Offset: 0xE8) PWM Write Protection Status Register
Definition: pwm.h:106
#define __O
Definition: core_cm7.h:265
__IO uint32_t PWM_FPV2
(Pwm Offset: 0xC0) PWM Fault Protection Value 2 Register
Definition: pwm.h:103
__I uint32_t PWM_SR
(Pwm Offset: 0x0C) PWM Status Register
Definition: pwm.h:70
__IO uint32_t PWM_CLK
(Pwm Offset: 0x00) PWM Clock Register
Definition: pwm.h:67
__O uint32_t PWM_DIS
(Pwm Offset: 0x08) PWM Disable Register
Definition: pwm.h:69
__IO uint32_t PWM_OOV
(Pwm Offset: 0x44) PWM Output Override Value Register
Definition: pwm.h:84
__O uint32_t PWM_CMUPD0
(Pwm Offset: 0x400) PWM Channel Mode Update Register (ch_num = 0)
Definition: pwm.h:114
__IO uint32_t PWM_CMPM
(PwmCmp Offset: 0x8) PWM Comparison 0 Mode Register
Definition: pwm.h:60
__IO uint32_t PWM_SCUP
(Pwm Offset: 0x2C) PWM Sync Channels Update Period Register
Definition: pwm.h:78
__IO uint32_t PWM_LEBR1
(Pwm Offset: 0x430) PWM Leading-Edge Blanking Register (trg_num = 1)
Definition: pwm.h:119
__I uint32_t PWM_VERSION
(Pwm Offset: 0xFC) Version Register
Definition: pwm.h:108
__IO uint32_t PWM_SCUC
(Pwm Offset: 0x28) PWM Sync Channels Update Control Register
Definition: pwm.h:77
__I uint32_t PWM_IMR1
(Pwm Offset: 0x18) PWM Interrupt Mask Register 1
Definition: pwm.h:73
__O uint32_t PWM_OSCUPD
(Pwm Offset: 0x58) PWM Output Selection Clear Update Register
Definition: pwm.h:89
__O uint32_t PWM_SSPUP
(Pwm Offset: 0xA4) PWM Spread Spectrum Update Register
Definition: pwm.h:99
__IO uint32_t PWM_FMR
(Pwm Offset: 0x5C) PWM Fault Mode Register
Definition: pwm.h:90
__O uint32_t PWM_CMPVUPD
(PwmCmp Offset: 0x4) PWM Comparison 0 Value Update Register
Definition: pwm.h:59
__O uint32_t PWM_CPRDUPD
(PwmCh_num Offset: 0x10) PWM Channel Period Update Register
Definition: pwm.h:51
__O uint32_t PWM_IER1
(Pwm Offset: 0x10) PWM Interrupt Enable Register 1
Definition: pwm.h:71
__IO uint32_t PWM_LEBR2
(Pwm Offset: 0x450) PWM Leading-Edge Blanking Register (trg_num = 2)
Definition: pwm.h:124
__O uint32_t PWM_CMUPD1
(Pwm Offset: 0x420) PWM Channel Mode Update Register (ch_num = 1)
Definition: pwm.h:116
__IO uint32_t PWM_CDTY
(PwmCh_num Offset: 0x4) PWM Channel Duty Cycle Register
Definition: pwm.h:48
#define PWMCMP_NUMBER
Pwm hardware registers.
Definition: pwm.h:64
__IO uint32_t PWM_ETRG2
(Pwm Offset: 0x44C) PWM External Trigger Register (trg_num = 2)
Definition: pwm.h:123
__O uint32_t PWM_SCUPUPD
(Pwm Offset: 0x30) PWM Sync Channels Update Period Update Register
Definition: pwm.h:79
__IO uint32_t PWM_FPE
(Pwm Offset: 0x6C) PWM Fault Protection Enable Register
Definition: pwm.h:94
__IO uint32_t PWM_SSPR
(Pwm Offset: 0xA0) PWM Spread Spectrum Register
Definition: pwm.h:98
__O uint32_t PWM_CDTYUPD
(PwmCh_num Offset: 0x8) PWM Channel Duty Cycle Update Register
Definition: pwm.h:49
__I uint32_t PWM_IMR2
(Pwm Offset: 0x3C) PWM Interrupt Mask Register 2
Definition: pwm.h:82
__IO uint32_t PWM_CMR
(PwmCh_num Offset: 0x0) PWM Channel Mode Register
Definition: pwm.h:47
__I uint32_t PWM_ISR1
(Pwm Offset: 0x1C) PWM Interrupt Status Register 1
Definition: pwm.h:74
__O uint32_t PWM_OSSUPD
(Pwm Offset: 0x54) PWM Output Selection Set Update Register
Definition: pwm.h:88
__O uint32_t PWM_OSS
(Pwm Offset: 0x4C) PWM Output Selection Set Register
Definition: pwm.h:86
__I uint32_t PWM_FSR
(Pwm Offset: 0x60) PWM Fault Status Register
Definition: pwm.h:91
__O uint32_t PWM_CMUPD3
(Pwm Offset: 0x460) PWM Channel Mode Update Register (ch_num = 3)
Definition: pwm.h:126
PwmCmp hardware registers.
Definition: pwm.h:57
__IO uint32_t PWM_OS
(Pwm Offset: 0x48) PWM Output Selection Register
Definition: pwm.h:85
PwmCh_num hardware registers.
Definition: pwm.h:46
__O uint32_t PWM_CMPMUPD
(PwmCmp Offset: 0xC) PWM Comparison 0 Mode Update Register
Definition: pwm.h:61
__O uint32_t PWM_IER2
(Pwm Offset: 0x34) PWM Interrupt Enable Register 2
Definition: pwm.h:80
__IO uint32_t PWM_SMMR
(Pwm Offset: 0xB0) PWM Stepper Motor Mode Register
Definition: pwm.h:101
__IO uint32_t PWM_DT
(PwmCh_num Offset: 0x18) PWM Channel Dead Time Register
Definition: pwm.h:53
__I uint32_t PWM_CCNT
(PwmCh_num Offset: 0x14) PWM Channel Counter Register
Definition: pwm.h:52
#define PWMCH_NUM_NUMBER
Definition: pwm.h:65
__IO uint32_t PWM_SCM
(Pwm Offset: 0x20) PWM Sync Channels Mode Register
Definition: pwm.h:75
__O uint32_t PWM_OSC
(Pwm Offset: 0x50) PWM Output Selection Clear Register
Definition: pwm.h:87
#define __I
Definition: core_cm7.h:263
__IO uint32_t PWM_FPV1
(Pwm Offset: 0x68) PWM Fault Protection Value Register 1
Definition: pwm.h:93
__O uint32_t PWM_IDR2
(Pwm Offset: 0x38) PWM Interrupt Disable Register 2
Definition: pwm.h:81


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:58