MotorWare f2806x Driver API Documentation

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

pwm.c
Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
2 * Copyright (c) 2015, Texas Instruments Incorporated
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 * --/COPYRIGHT--*/
38
39 // **************************************************************************
40 // the includes
41
42 #include "sw/drivers/pwm/src/32b/f28x/f2806x/pwm.h"
43
44
45 // **************************************************************************
46 // the defines
47
48
49 // **************************************************************************
50 // the globals
51
52
53 // **************************************************************************
54 // the functions
55
56 void PWM_clearTripZone(PWM_Handle pwmHandle, const PWM_TripZoneFlag_e tripZoneFlag)
57 {
58 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
59
60 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
61
62 // set the bits
63 pwm->TZCLR |= tripZoneFlag;
64
65 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
66
67 return;
68 } // end of PWM_clearTripZone() function
69
70
71 void PWM_decrementDeadBandFallingEdgeDelay(PWM_Handle pwmHandle)
72 {
73 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
74
75
76 pwm->DBFED--;
77
78 return;
79 } // end of PWM_decrementDeadBandFallingEdgeDelay() function
80
81
82 void PWM_decrementDeadBandRisingEdgeDelay(PWM_Handle pwmHandle)
83 {
84 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
85
86
87 pwm->DBRED--;
88
89 return;
90 } // end of PWM_decrementDeadBandRisingEdgeDelay() function
91
92
93 void PWM_disableAutoConvert(PWM_Handle pwmHandle)
94 {
95 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
96
97 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
98
99 // clear the bits
100 pwm->HRCNFG &= ~PWM_HRCNFG_AUTOCONV_BITS;
101
102 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
103
104 return;
105 } // end of PWM_disableAutoConvert() function
106
107
108 void PWM_disableChopping(PWM_Handle pwmHandle)
109 {
110 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
111
112 // clear the bits
113 pwm->PCCTL &= (~PWM_PCCTL_CHPEN_BITS);
114
115 return;
116 } // end of PWM_disableChopping() function
117
118
119 void PWM_disableCounterLoad(PWM_Handle pwmHandle)
120 {
121 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
122
123
124 // clear the bits
125 pwm->TBCTL &= (~PWM_TBCTL_PHSEN_BITS);
126
127 return;
128 } // end of PWM_disableCounterLoad() function
129
130
131 void PWM_disableDeadBand(PWM_Handle pwmHandle)
132 {
133 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
134
135
136 // clear the bits
137 pwm->DBCTL = 0;
138
139 return;
140 } // end of PWM_disableDeadBand() function
141
142
143 void PWM_disableDeadBandHalfCycle(PWM_Handle pwmHandle)
144 {
145 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
146
147
148 // clear the bits
149 pwm->DBCTL &= (~PWM_DBCTL_HALFCYCLE_BITS);
150
151 return;
152 } // end of PWM_disableDeadBandHalfCycle() function
153
154
155 void PWM_disableDigitalCompareBlankingWindow(PWM_Handle pwmHandle)
156 {
157 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
158
159 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
160
161 // clear the bits
162 pwm->DCFCTL &= ~PWM_DCFCTL_BLANKE_BITS;
163
164 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
165
166 return;
167 } // end of PWM_disableDigitalCompareBlankingWindow() function
168
169
170 void PWM_disableDigitalCompareBlankingWindowInversion(PWM_Handle pwmHandle)
171 {
172 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
173
174 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
175
176 // clear the bits
177 pwm->DCFCTL &= ~PWM_DCFCTL_BLANKINV_BITS;
178
179 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
180
181 return;
182 } // end of PWM_disableDigitalCompareBlankingWindowInversion() function
183
184
185 void PWM_disableHrPeriod(PWM_Handle pwmHandle)
186 {
187 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
188
189 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
190
191 // clear the bits
192 pwm->HRPCTL &= ~PWM_HRPCTL_HRPE_BITS;
193
194 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
195
196 return;
197 } // end of PWM_disableHrPeriod() function
198
199
200 void PWM_disableHrPhaseSync(PWM_Handle pwmHandle)
201 {
202 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
203
204 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
205
206 // clear the bits
207 pwm->HRPCTL &= ~PWM_HRPCTL_TBPHSHRLOADE_BITS;
208
209 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
210
211 return;
212 } // end of PWM_disableHrPhaseSync() function
213
214
215 void PWM_disableInt(PWM_Handle pwmHandle)
216 {
217 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
218
219
220 // clear the bits
221 pwm->ETSEL &= (~PWM_ETSEL_INTEN_BITS);
222
223 return;
224 } // end of PWM_disableInt() function
225
226
227 void PWM_disableSocAPulse(PWM_Handle pwmHandle)
228 {
229 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
230
231
232 // clear the bits
233 pwm->ETSEL &= (~PWM_ETSEL_SOCAEN_BITS);
234
235 return;
236 } // end of PWM_disableSocAPulse() function
237
238
239 void PWM_disableSocBPulse(PWM_Handle pwmHandle)
240 {
241 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
242
243
244 // clear the bits
245 pwm->ETSEL &= (~PWM_ETSEL_SOCBEN_BITS);
246
247 return;
248 } // end of PWM_disableSocBPulse() function
249
250
251 void PWM_disableTripZones(PWM_Handle pwmHandle)
252 {
253 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
254
255
256 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
257
258 // clear the bits
259 pwm->TZSEL = 0;
260
261 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
262
263 return;
264 } // end of PWM_disableTripZones() function
265
266
267 void PWM_disableTripZoneInt(PWM_Handle pwmHandle, const PWM_TripZoneFlag_e interruptSource)
268 {
269 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
270
271
272 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
273
274 // clear the bits
275 pwm->TZEINT &= ~interruptSource;
276
277 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
278
279 return;
280 } // end of PWM_disableTripZoneInt() function
281
282
283 void PWM_disableTripZoneSrc(PWM_Handle pwmHandle, const PWM_TripZoneSrc_e src)
284 {
285 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
286
287
288 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
289
290 // clear the bits
291 pwm->TZSEL &= (~src);
292
293 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
294
295 return;
296 } // end of PWM_disableTripZoneSrc() function
297
298
299 void PWM_enableAutoConvert(PWM_Handle pwmHandle)
300 {
301 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
302
303 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
304
305 // set the bits
306 pwm->HRCNFG |= PWM_HRCNFG_AUTOCONV_BITS;
307
308 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
309
310 return;
311 } // end of PWM_enableAutoConvert() function
312
313
314 void PWM_enableChopping(PWM_Handle pwmHandle)
315 {
316 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
317
318 // set the bits
319 pwm->PCCTL = (uint16_t)1;
320
321 return;
322 } // end of PWM_enableChopping() function
323
324
325 void PWM_enableCounterLoad(PWM_Handle pwmHandle)
326 {
327 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
328
329
330 // set the bits
331 pwm->TBCTL |= PWM_TBCTL_PHSEN_BITS;
332
333 return;
334 } // end of PWM_enableCounterLoad() function
335
336
337 void PWM_enableDeadBandHalfCycle(PWM_Handle pwmHandle)
338 {
339 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
340
341
342 // set the bits
343 pwm->DBCTL |= (uint16_t)PWM_DBCTL_HALFCYCLE_BITS;
344
345 return;
346 } // end of PWM_enableDeadBandHalfCycle() function
347
348
349 void PWM_enableDigitalCompareBlankingWindow(PWM_Handle pwmHandle)
350 {
351 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
352
353 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
354
355 // set the bits
356 pwm->DCFCTL |= PWM_DCFCTL_BLANKE_BITS;
357
358 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
359
360 return;
361 } // end of PWM_enableDigitalCompareBlankingWindow() function
362
363
364 void PWM_enableDigitalCompareBlankingWindowInversion(PWM_Handle pwmHandle)
365 {
366 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
367
368 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
369
370 // set the bits
371 pwm->DCFCTL |= PWM_DCFCTL_BLANKINV_BITS;
372
373 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
374
375 return;
376 } // end of PWM_enableDigitalCompareBlankingWindowInversion() function
377
378
379 void PWM_enableHrPeriod(PWM_Handle pwmHandle)
380 {
381 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
382
383 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
384
385 // set the bits
386 pwm->HRPCTL |= PWM_HRPCTL_HRPE_BITS;
387
388 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
389
390 return;
391 } // end of PWM_enableHrPeriod() function
392
393
394 void PWM_enableInt(PWM_Handle pwmHandle)
395 {
396 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
397
398
399 // set the bits
400 pwm->ETSEL |= PWM_ETSEL_INTEN_BITS;
401
402 return;
403 } // end of PWM_enableInt() function
404
405
406 void PWM_enableHrPhaseSync(PWM_Handle pwmHandle)
407 {
408 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
409
410 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
411
412 // set the bits
413 pwm->HRPCTL |= PWM_HRPCTL_TBPHSHRLOADE_BITS;
414
415 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
416
417 return;
418 } // end of PWM_enableHrPhaseSync() function
419
420
421 void PWM_enableSocAPulse(PWM_Handle pwmHandle)
422 {
423 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
424
425
426 // set the bits
427 pwm->ETSEL |= PWM_ETSEL_SOCAEN_BITS;
428
429 return;
430 } // end of PWM_enableSocAPulse() function
431
432
433 void PWM_enableSocBPulse(PWM_Handle pwmHandle)
434 {
435 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
436
437
438 // set the bits
439 pwm->ETSEL |= (uint16_t)PWM_ETSEL_SOCBEN_BITS;
440
441 return;
442 } // end of PWM_enableSocBPulse() function
443
444
445 void PWM_enableTripZoneInt(PWM_Handle pwmHandle, const PWM_TripZoneFlag_e interruptSource)
446 {
447 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
448
449 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
450
451 // set the bits
452 pwm->TZEINT |= interruptSource;
453
454 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
455
456 return;
457 } // end of PWM_enableTripZoneInt() function
458
459
460 void PWM_enableTripZoneSrc(PWM_Handle pwmHandle, const PWM_TripZoneSrc_e src)
461 {
462 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
463
464
465 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
466
467 // set the bits
468 pwm->TZSEL |= src;
469
470 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
471
472 return;
473 } // end of PWM_enableTripZoneSrc() function
474
475
476 uint16_t PWM_getDeadBandFallingEdgeDelay(PWM_Handle pwmHandle)
477 {
478 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
479
480 return (pwm->DBFED);
481 } // end of PWM_getDeadBandFallingEdgeDelay() function
482
483
484 uint16_t PWM_getDeadBandRisingEdgeDelay(PWM_Handle pwmHandle)
485 {
486 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
487
488 return (pwm->DBRED);
489 } // end of PWM_getDeadBandRisingEdgeDelay() function
490
491
492 uint16_t PWM_getIntCount(PWM_Handle pwmHandle)
493 {
494 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
495 uint16_t intCount;
496
497 intCount = pwm->ETPS & PWM_ETPS_INTCNT_BITS;
498
499 return(intCount);
500 } // end of PWM_getIntCount() function
501
502 uint16_t PWM_getSocACount(PWM_Handle pwmHandle)
503 {
504 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
505 uint16_t intCount;
506
507 intCount = pwm->ETPS & PWM_ETPS_SOCACNT_BITS;
508
509 intCount >>= 10;
510
511 return(intCount);
512 } // end of PWM_getSocACount() function
513
514
515 uint16_t PWM_getSocBCount(PWM_Handle pwmHandle)
516 {
517 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
518 uint16_t intCount;
519
520 intCount = pwm->ETPS & (uint16_t)PWM_ETPS_SOCBCNT_BITS;
521
522 intCount >>= 14;
523
524 return(intCount);
525 } // end of PWM_getSocBCount() function
526
527
528 PWM_ShadowStatus_e PWM_getShadowStatus_CmpA(PWM_Handle pwmHandle)
529 {
530 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
531 PWM_ShadowStatus_e status;
532
533
534 // clear the bits
535 status = (PWM_ShadowStatus_e)(pwm->TBCTL & (~PWM_CMPCTL_SHDWAFULL_BITS));
536
537 status >>= 8;
538
539 return(status);
540 } // end of PWM_getShadowStatus_CmpA() function
541
542
543 PWM_ShadowStatus_e PWM_getShadowStatus_CmpB(PWM_Handle pwmHandle)
544 {
545 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
546 PWM_ShadowStatus_e status;
547
548
549 // clear the bits
550 status = (PWM_ShadowStatus_e)(pwm->TBCTL & (~PWM_CMPCTL_SHDWAFULL_BITS));
551
552 status >>= 9;
553
554 return(status);
555 } // end of PWM_getShadowStatus_CmpB() function
556
557
558 void PWM_setHrControlMode(PWM_Handle pwmHandle, const PWM_HrControlMode_e controlMode)
559 {
560 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
561
562 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
563
564 pwm->HRCNFG &= ~PWM_HRCNFG_CTLMODE_BITS;
565
566 pwm->HRCNFG |= controlMode;
567
568 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
569
570 return;
571 } // end of PWM_setHrControlMode() function
572
573
574 void PWM_setHrEdgeMode(PWM_Handle pwmHandle, const PWM_HrEdgeMode_e edgeMode)
575 {
576 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
577
578 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
579
580 pwm->HRCNFG &= ~PWM_HRCNFG_EDGMODE_BITS;
581
582 pwm->HRCNFG |= edgeMode;
583
584 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
585
586 return;
587 } // end of PWM_setHrEdgeMode() function
588
589
590 void PWM_setHrShadowMode(PWM_Handle pwmHandle, const PWM_HrShadowMode_e shadowMode)
591 {
592 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
593
594 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
595
596 pwm->HRCNFG &= ~PWM_HRCNFG_HRLOAD_BITS;
597
598 pwm->HRCNFG |= shadowMode;
599
600 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
601
602 return;
603 } // end of PWM_setHrShadowMode() function
604
605
606 void PWM_incrementDeadBandFallingEdgeDelay(PWM_Handle pwmHandle)
607 {
608 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
609
610
611 pwm->DBFED++;
612
613 return;
614 } // end of PWM_incrementDeadBandFallingEdgeDelay() function
615
616
617 void PWM_incrementDeadBandRisingEdgeDelay(PWM_Handle pwmHandle)
618 {
619 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
620
621
622 pwm->DBRED++;
623
624 return;
625 } // end of PWM_incrementDeadBandRisingEdgeDelay() function
626
627
628 PWM_Handle PWM_init(void *pMemory, const size_t numBytes)
629 {
630 PWM_Handle pwmHandle;
631
632
633 if(numBytes < sizeof(PWM_Obj))
634 return((PWM_Handle)NULL);
635
636
637 // assign the handle
638 pwmHandle = (PWM_Handle)pMemory;
639
640 return(pwmHandle);
641 } // end of PWM_init() function
642
643
644 void PWM_setActionQual_CntDown_CmpA_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
645 {
646 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
647
648
649 // clear the bits
650 pwm->AQCTLA &= (~PWM_AQCTL_CAD_BITS);
651
652 // set the bits
653 pwm->AQCTLA |= (actionQual << 6);
654
655 return;
656 } // end of PWM_setActionQual_CntDown_CmpA_PwmA() function
657
658
659 void PWM_setActionQual_CntDown_CmpA_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
660 {
661 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
662
663
664 // clear the bits
665 pwm->AQCTLB &= (~PWM_AQCTL_CAD_BITS);
666
667 // set the bits
668 pwm->AQCTLB |= (actionQual << 6);
669
670 return;
671 } // end of PWM_setActionQual_CntDown_CmpA_PwmB() function
672
673
674 void PWM_setActionQual_CntDown_CmpB_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
675 {
676 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
677
678
679 // clear the bits
680 pwm->AQCTLA &= (~PWM_AQCTL_CBD_BITS);
681
682 // set the bits
683 pwm->AQCTLA |= (actionQual << 10);
684
685 return;
686 } // end of PWM_setActionQual_CntDown_CmpB_PwmA() function
687
688
689 void PWM_setActionQual_CntDown_CmpB_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
690 {
691 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
692
693
694 // clear the bits
695 pwm->AQCTLB &= (~PWM_AQCTL_CBD_BITS);
696
697 // set the bits
698 pwm->AQCTLB |= (actionQual << 10);
699
700 return;
701 } // end of PWM_setActionQual_CntDown_CmpB_PwmB() function
702
703
704 void PWM_setActionQual_CntUp_CmpA_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
705 {
706 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
707
708
709 // clear the bits
710 pwm->AQCTLA &= (~PWM_AQCTL_CAU_BITS);
711
712 // set the bits
713 pwm->AQCTLA |= (actionQual << 4);
714
715 return;
716 } // end of PWM_setActionQual_CntUp_CmpA_PwmA() function
717
718
719 void PWM_setActionQual_CntUp_CmpA_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
720 {
721 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
722
723
724 // clear the bits
725 pwm->AQCTLB &= (~PWM_AQCTL_CAU_BITS);
726
727 // set the bits
728 pwm->AQCTLB |= (actionQual << 4);
729
730 return;
731 } // end of PWM_setActionQual_CntUp_CmpA_PwmB() function
732
733
734 void PWM_setActionQual_CntUp_CmpB_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
735 {
736 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
737
738
739 // clear the bits
740 pwm->AQCTLA &= (~PWM_AQCTL_CBU_BITS);
741
742 // set the bits
743 pwm->AQCTLA |= (actionQual << 8);
744
745 return;
746 } // end of PWM_setActionQual_CntUp_CmpB_PwmA() function
747
748
749 void PWM_setActionQual_CntUp_CmpB_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
750 {
751 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
752
753
754 // clear the bits
755 pwm->AQCTLB &= (~PWM_AQCTL_CBU_BITS);
756
757 // set the bits
758 pwm->AQCTLB |= (actionQual << 8);
759
760 return;
761 } // end of PWM_setActionQual_CntUp_CmpB_PwmB() function
762
763
764 void PWM_setActionQualContSWForce_PwmA(PWM_Handle pwmHandle,const PWM_ActionQualContSWForce_e actionQualContSWForce)
765 {
766 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
767
768
769 // clear the bits
770 pwm->AQCSFRC &= (~PWM_AQCSFRC_CSFA_BITS);
771
772 // set the bits
773 pwm->AQCSFRC |= actionQualContSWForce;
774
775 return;
776 } // end of PWM_setActionQualContSWForce_PwmA() function
777
778
779 void PWM_setActionQualContSWForce_PwmB(PWM_Handle pwmHandle,const PWM_ActionQualContSWForce_e actionQualContSWForce)
780 {
781 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
782
783
784 // clear the bits
785 pwm->AQCSFRC &= (~PWM_AQCSFRC_CSFB_BITS);
786
787 // set the bits
788 pwm->AQCSFRC |= (actionQualContSWForce << 2);
789
790 return;
791 } // end of PWM_setActionQualContSWForce_PwmA() function
792
793
794 void PWM_setActionQual_Period_PwmA(PWM_Handle pwmHandle,const PWM_ActionQual_e actionQual)
795 {
796 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
797
798
799 // clear the bits
800 pwm->AQCTLA &= (~PWM_AQCTL_PRD_BITS);
801
802 // set the bits
803 pwm->AQCTLA |= (actionQual << 2);
804
805 return;
806 } // end of PWM_setActionQual_Period_PwmA() function
807
808
809 void PWM_setActionQual_Period_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
810 {
811 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
812
813
814 // clear the bits
815 pwm->AQCTLB &= (~PWM_AQCTL_PRD_BITS);
816
817 // set the bits
818 pwm->AQCTLB |= (actionQual << 2);
819
820 return;
821 } // end of PWM_setActionQual_Period_PwmB() function
822
823
824 void PWM_setActionQual_Zero_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
825 {
826 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
827
828
829 // clear the bits
830 pwm->AQCTLA &= (~PWM_AQCTL_ZRO_BITS);
831
832 // set the bits
833 pwm->AQCTLA |= actionQual;
834
835 return;
836 } // end of PWM_setActionQualZero_PwmA() function
837
838
839 void PWM_setActionQual_Zero_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
840 {
841 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
842
843
844 // clear the bits
845 pwm->AQCTLB &= (~PWM_AQCTL_ZRO_BITS);
846
847 // set the bits
848 pwm->AQCTLB |= actionQual;
849
850 return;
851 } // end of PWM_setActionQualZero_PwmB() function
852
853
854 void PWM_setChoppingClkFreq(PWM_Handle pwmHandle, const PWM_ChoppingClkFreq_e clkFreq)
855 {
856 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
857
858
859 // clear the bits
860 pwm->PCCTL &= (~PWM_PCCTL_CHPFREQ_BITS);
861
862 // set the bits
863 pwm->PCCTL |= clkFreq;
864
865 return;
866 } // end of PWM_setChoppingClkFreq() function
867
868
869 void PWM_setChoppingDutyCycle(PWM_Handle pwmHandle, const PWM_ChoppingDutyCycle_e dutyCycle)
870 {
871 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
872
873
874 // clear the bits
875 pwm->PCCTL &= (~PWM_PCCTL_CHPDUTY_BITS);
876
877 // set the bits
878 pwm->PCCTL |= dutyCycle;
879
880 return;
881 } // end of PWM_setChoppingDutyCycle() function
882
883
884 void PWM_setChoppingPulseWidth(PWM_Handle pwmHandle, const PWM_ChoppingPulseWidth_e pulseWidth)
885 {
886 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
887
888
889 // clear the bits
890 pwm->PCCTL &= (~PWM_PCCTL_OSHTWTH_BITS);
891
892 // set the bits
893 pwm->PCCTL |= pulseWidth;
894
895 return;
896 } // end of PWM_setChoppingPulseWidth() function
897
898
899 void PWM_setClkDiv(PWM_Handle pwmHandle, const PWM_ClkDiv_e clkDiv)
900 {
901 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
902
903
904 // clear the bits
905 pwm->TBCTL &= (~PWM_TBCTL_CLKDIV_BITS);
906
907 // set the bits
908 pwm->TBCTL |= clkDiv;
909
910 return;
911 } // end of PWM_setClkDiv() function
912
913
914 void PWM_setCount(PWM_Handle pwmHandle, const uint16_t count)
915 {
916 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
917
918
919 // set the bits
920 pwm->TBCTR = count;
921
922 return;
923 } // end of PWM_setCount() function
924
925
926 void PWM_setCounterMode(PWM_Handle pwmHandle, const PWM_CounterMode_e counterMode)
927 {
928 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
929
930
931 // clear the bits
932 pwm->TBCTL &= (~PWM_TBCTL_CTRMODE_BITS);
933
934 // set the bits
935 pwm->TBCTL |= counterMode;
936
937 return;
938 } // end of PWM_setCounterMode() function
939
940
941 void PWM_setDeadBandFallingEdgeDelay(PWM_Handle pwmHandle,const uint16_t delay)
942 {
943 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
944
945
946 pwm->DBFED = delay;
947
948 return;
949 } // end of PWM_setDeadBandFallingEdgeDelay() function
950
951
952 void PWM_setDeadBandInputMode(PWM_Handle pwmHandle, const PWM_DeadBandInputMode_e inputMode)
953 {
954 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
955
956
957 // clear the bits
958 pwm->DBCTL &= (~PWM_DBCTL_INMODE_BITS);
959
960 // set the bits
961 pwm->DBCTL |= inputMode;
962
963 return;
964 } // end of PWM_setDeadBandInputMode() function
965
966
967 void PWM_setDeadBandOutputMode(PWM_Handle pwmHandle, const PWM_DeadBandOutputMode_e outputMode)
968 {
969 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
970
971
972 // clear the bits
973 pwm->DBCTL &= (~PWM_DBCTL_OUTMODE_BITS);
974
975 // set the bits
976 pwm->DBCTL |= outputMode;
977
978 return;
979 } // end of PWM_setDeadBandOutputMode() function
980
981
982 void PWM_setDeadBandPolarity(PWM_Handle pwmHandle, const PWM_DeadBandPolarity_e polarity)
983 {
984 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
985
986
987 // clear the bits
988 pwm->DBCTL &= (~PWM_DBCTL_POLSEL_BITS);
989
990 // set the bits
991 pwm->DBCTL |= polarity;
992
993 return;
994 } // end of PWM_setDeadBandPolarity() function
995
996
997 void PWM_setDeadBandRisingEdgeDelay(PWM_Handle pwmHandle,const uint16_t delay)
998 {
999 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1000
1001
1002 pwm->DBRED = delay;
1003
1004 return;
1005 } // end of PWM_setDeadBandRisingEdgeDelay() function
1006
1007
1008
1009 void PWM_setDigitalCompareFilterSource(PWM_Handle pwmHandle,
1010 const PWM_DigitalCompare_FilterSrc_e input)
1011 {
1012 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1013
1014 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1015
1016 // Clear any old values
1017 pwm->DCFCTL &= ~PWM_DCFCTL_SRCSEL_BITS;
1018
1019 // Set the new value
1020 pwm->DCFCTL |= input;
1021
1022 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1023
1024 return;
1025 } // end of PWM_setDigitalCompareFilterSource() function
1026
1027
1028 void PWM_setDigitalCompareBlankingPulse(PWM_Handle pwmHandle,
1029 const PWM_DigitalCompare_PulseSel_e pulseSelect)
1030 {
1031 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1032
1033 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1034
1035 // Clear any old values
1036 pwm->DCFCTL &= ~PWM_DCFCTL_PULSESEL_BITS;
1037
1038 // Set the new value
1039 pwm->DCFCTL |= pulseSelect << 4;
1040
1041 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1042
1043 return;
1044 } // end of PWM_setDigitalCompareBlankingPulse() function
1045
1046
1047 void PWM_setDigitalCompareFilterOffset(PWM_Handle pwmHandle,
1048 const uint16_t offset)
1049 {
1050 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1051
1052 // Set the filter offset
1053 pwm->DCFOFFSET = offset;
1054
1055 return;
1056 } // end of PWM_setDigitalCompareFilterOffset() function
1057
1058
1059 void PWM_setDigitalCompareFilterWindow(PWM_Handle pwmHandle,
1060 const uint16_t window)
1061 {
1062 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1063
1064 // Set the window
1065 pwm->DCFWINDOW = window;
1066
1067 return;
1068 } // end of PWM_setDigitalCompareFilterWindow() function
1069
1070
1071 void PWM_setDigitalCompareInput(PWM_Handle pwmHandle,
1072 const PWM_DigitalCompare_Input_e input,
1073 const PWM_DigitalCompare_InputSel_e inputSel)
1074 {
1075 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1076
1077 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1078
1079 // Clear any old values
1080 pwm->DCTRIPSEL &= ~(0x000F << input);
1081
1082 // Set the new value
1083 pwm->DCTRIPSEL |= (inputSel << input);
1084
1085 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1086
1087 return;
1088 } // end of PWM_setDigitalCompareInput() function
1089
1090
1091 void PWM_setDigitalCompareAEvent1(PWM_Handle pwmHandle,
1092 const bool selectFilter,
1093 const bool disableSync,
1094 const bool enableSoc,
1095 const bool generateSync)
1096 {
1097 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1098
1099 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1100
1101 // Clear any old values
1102 pwm->DCACTL &= ~0x000F;
1103
1104 // Set the new value
1105 pwm->DCACTL |= selectFilter | (disableSync << 1) | (enableSoc << 2) | (generateSync << 3);
1106
1107 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1108
1109 return;
1110 } // end of PWM_setDigitalCompareAEvent1() function
1111
1112
1113 void PWM_setDigitalCompareAEvent2(PWM_Handle pwmHandle,
1114 const bool selectFilter,
1115 const bool disableSync)
1116 {
1117 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1118
1119 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1120
1121 // Clear any old values
1122 pwm->DCACTL &= ~0x0300;
1123
1124 // Set the new value
1125 pwm->DCACTL |= (selectFilter << 8) | (disableSync << 9) ;
1126
1127 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1128
1129 return;
1130 } // end of PWM_setDigitalCompareAEvent2() function
1131
1132
1133 void PWM_setDigitalCompareBEvent1(PWM_Handle pwmHandle,
1134 const bool selectFilter,
1135 const bool disableSync,
1136 const bool enableSoc,
1137 const bool generateSync)
1138 {
1139 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1140
1141 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1142
1143 // Clear any old values
1144 pwm->DCBCTL &= ~0x000F;
1145
1146 // Set the new value
1147 pwm->DCBCTL |= selectFilter | (disableSync << 1) | (enableSoc << 2) | (generateSync << 3);
1148
1149 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1150
1151 return;
1152 } // end of PWM_setDigitalCompareBEvent1() function
1153
1154
1155 void PWM_setDigitalCompareBEvent2(PWM_Handle pwmHandle,
1156 const bool selectFilter,
1157 const bool disableSync)
1158 {
1159 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1160
1161 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1162
1163 // Clear any old values
1164 pwm->DCBCTL &= ~0x0300;
1165
1166 // Set the new value
1167 pwm->DCBCTL |= (selectFilter << 8) | (disableSync << 9) ;
1168
1169 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1170
1171 return;
1172 } // end of PWM_setDigitalCompareBEvent2() function
1173
1174
1175 void PWM_setHighSpeedClkDiv(PWM_Handle pwmHandle, const PWM_HspClkDiv_e clkDiv)
1176 {
1177 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1178
1179
1180 // clear the bits
1181 pwm->TBCTL &= (~PWM_TBCTL_HSPCLKDIV_BITS);
1182
1183 // set the bits
1184 pwm->TBCTL |= clkDiv;
1185
1186 return;
1187 } // end of PWM_setHighSpeedClkDiv() function
1188
1189
1190 void PWM_setIntMode(PWM_Handle pwmHandle, const PWM_IntMode_e intMode)
1191 {
1192 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1193
1194
1195 // clear the bits
1196 pwm->ETSEL &= (~PWM_ETSEL_INTSEL_BITS);
1197
1198 // set the bits
1199 pwm->ETSEL |= intMode;
1200
1201 return;
1202 } // end of PWM_setIntMode() function
1203
1204
1205 void PWM_setIntPeriod(PWM_Handle pwmHandle, const PWM_IntPeriod_e intPeriod)
1206 {
1207 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1208
1209
1210 // clear the bits
1211 pwm->ETPS &= (~PWM_ETPS_INTPRD_BITS);
1212
1213 // set the bits
1214 pwm->ETPS |= intPeriod;
1215
1216 return;
1217 } // end of PWM_setIntPeriod() function
1218
1219
1220 void PWM_setLoadMode_CmpA(PWM_Handle pwmHandle, const PWM_LoadMode_e loadMode)
1221 {
1222 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1223
1224
1225 // clear the bits
1226 pwm->CMPCTL &= (~PWM_CMPCTL_LOADAMODE_BITS);
1227
1228 // set the bits
1229 pwm->CMPCTL |= loadMode;
1230
1231 return;
1232 } // end of PWM_setLoadMode_CmpA() function
1233
1234
1235 void PWM_setLoadMode_CmpB(PWM_Handle pwmHandle, const PWM_LoadMode_e loadMode)
1236 {
1237 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1238
1239
1240 // clear the bits
1241 pwm->CMPCTL &= (~PWM_CMPCTL_LOADBMODE_BITS);
1242
1243 // set the bits
1244 pwm->CMPCTL |= (loadMode << 2);
1245
1246 return;
1247 } // end of PWM_setLoadMode_CmpB() function
1248
1249
1250 void PWM_setPeriod(PWM_Handle pwmHandle, const uint16_t period)
1251 {
1252 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1253
1254
1255 // initialize the Time-Base Period Register (TBPRD). These bits determine the period of the time-base counter.
1256 pwm->TBPRD = period;
1257
1258 return;
1259 } // end of PWM_setPeriod() function
1260
1261
1262 void PWM_setPeriodHr(PWM_Handle pwmHandle, const uint16_t period)
1263 {
1264 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1265
1266 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1267
1268 // initialize the Time-Base Period Register (TBPRD). These bits determine the period of the time-base counter.
1269 pwm->TBPRDHR = period;
1270
1271 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1272
1273 return;
1274 } // end of PWM_setPeriodHr() function
1275
1276
1277 void PWM_setPhase(PWM_Handle pwmHandle, const uint16_t phase)
1278 {
1279 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1280
1281
1282 pwm->TBPHS = phase;
1283
1284 return;
1285 } // end of PWM_setPhase() function
1286
1287
1288 void PWM_setPhaseDir(PWM_Handle pwmHandle, const PWM_PhaseDir_e phaseDir)
1289 {
1290 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1291
1292
1293 // clear the bits
1294 pwm->TBCTL &= (~PWM_TBCTL_PHSDIR_BITS);
1295
1296 // set the bits
1297 pwm->TBCTL |= phaseDir;
1298
1299 return;
1300 } // end of PWM_setPhaseDir() function
1301
1302
1303 void PWM_setPeriodLoad(PWM_Handle pwmHandle, const PWM_PeriodLoad_e periodLoad)
1304 {
1305 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1306
1307
1308 // clear the bits
1309 pwm->TBCTL &= (~PWM_TBCTL_PRDLD_BITS);
1310
1311 // set the bits
1312 pwm->TBCTL |= periodLoad;
1313
1314 return;
1315 } // end of PWM_setPeriodLoad() function
1316
1317
1318 void PWM_setRunMode(PWM_Handle pwmHandle, const PWM_RunMode_e runMode)
1319 {
1320 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1321
1322
1323 // clear the bits
1324 pwm->TBCTL &= (~PWM_TBCTL_FREESOFT_BITS);
1325
1326 // set the bits
1327 pwm->TBCTL |= runMode;
1328
1329 return;
1330 } // end of PWM_setRunMode() function
1331
1332
1333 void PWM_setSocAPeriod(PWM_Handle pwmHandle, const PWM_SocPeriod_e intPeriod)
1334 {
1335 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1336
1337
1338 // clear the bits
1339 pwm->ETPS &= (~PWM_ETPS_SOCAPRD_BITS);
1340
1341 // set the bits
1342 pwm->ETPS |= (intPeriod << 8);
1343
1344 return;
1345 } // end of PWM_setSocAPeriod() function
1346
1347
1348 void PWM_setSocAPulseSrc(PWM_Handle pwmHandle, const PWM_SocPulseSrc_e pulseSrc)
1349 {
1350 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1351
1352
1353 // clear the bits
1354 pwm->ETSEL &= (~PWM_ETSEL_SOCASEL_BITS);
1355
1356 // set the bits
1357 pwm->ETSEL |= (pulseSrc << 8);
1358
1359 return;
1360 } // end of PWM_setSocAPulseSrc() function
1361
1362
1363 void PWM_setSocBPeriod(PWM_Handle pwmHandle, const PWM_SocPeriod_e intPeriod)
1364 {
1365 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1366
1367
1368 // clear the bits
1369 pwm->ETPS &= (~PWM_ETPS_SOCBPRD_BITS);
1370
1371 // set the bits
1372 pwm->ETPS |= (intPeriod << 12);
1373
1374 return;
1375 } // end of PWM_setSocBPeriod() function
1376
1377
1378 void PWM_setSocBPulseSrc(PWM_Handle pwmHandle, const PWM_SocPulseSrc_e pulseSrc)
1379 {
1380 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1381
1382
1383 // clear the bits
1384 pwm->ETSEL &= (~PWM_ETSEL_SOCBSEL_BITS);
1385
1386 // set the bits
1387 pwm->ETSEL |= (pulseSrc << 12);
1388
1389 return;
1390 } // end of PWM_setSocBPulseSrc() function
1391
1392
1393 void PWM_setShadowMode_CmpA(PWM_Handle pwmHandle, const PWM_ShadowMode_e shadowMode)
1394 {
1395 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1396
1397
1398 // clear the bits
1399 pwm->CMPCTL &= (~PWM_CMPCTL_SHDWAMODE_BITS);
1400
1401 // set the bits
1402 pwm->CMPCTL |= (shadowMode << 4);
1403
1404 return;
1405 } // end of PWM_setShadowMode_CmpA() function
1406
1407
1408 void PWM_setShadowMode_CmpB(PWM_Handle pwmHandle, const PWM_ShadowMode_e shadowMode)
1409 {
1410 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1411
1412
1413 // clear the bits
1414 pwm->CMPCTL &= (~PWM_CMPCTL_SHDWBMODE_BITS);
1415
1416 // set the bits
1417 pwm->CMPCTL |= (shadowMode << 6);
1418
1419 return;
1420 } // end of PWM_setShadowMode_CmpB() function
1421
1422
1423 void PWM_setSwSync(PWM_Handle pwmHandle)
1424 {
1425 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1426
1427
1428 // set the bits
1429 pwm->TBCTL |= 1 << 6;
1430
1431 return;
1432 } // end of PWM_setSwSync() function
1433
1434
1435 void PWM_setSyncMode(PWM_Handle pwmHandle, const PWM_SyncMode_e syncMode)
1436 {
1437 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1438
1439
1440 // clear the bits
1441 pwm->TBCTL &= (~PWM_TBCTL_SYNCOSEL_BITS);
1442
1443 // set the bits
1444 pwm->TBCTL |= syncMode;
1445
1446 return;
1447 } // end of PWM_setSyncMode() function
1448
1449 void PWM_setTripZoneDCEventSelect_DCAEVT1(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent)
1450 {
1451 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1452
1453
1454 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1455
1456 // clear the bits
1457 pwm->TZDCSEL &= (~PWM_TZDCSEL_DCAEVT1_BITS);
1458
1459 // set the bits
1460 pwm->TZDCSEL |= tripZoneEvent << 0;
1461
1462 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1463
1464 return;
1465 } // end of PWM_setTripZoneDCEventSelect_DCAEVT1() function
1466
1467
1468 void PWM_setTripZoneDCEventSelect_DCAEVT2(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent)
1469 {
1470 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1471
1472
1473 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1474
1475 // clear the bits
1476 pwm->TZDCSEL &= (~PWM_TZDCSEL_DCAEVT2_BITS);
1477
1478 // set the bits
1479 pwm->TZDCSEL |= tripZoneEvent << 3;
1480
1481 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1482
1483 return;
1484 } // end of PWM_setTripZoneDCEventSelect_DCAEVT2() function
1485
1486
1487 void PWM_setTripZoneDCEventSelect_DCBEVT1(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent)
1488 {
1489 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1490
1491
1492 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1493
1494 // clear the bits
1495 pwm->TZDCSEL &= (~PWM_TZDCSEL_DCBEVT1_BITS);
1496
1497 // set the bits
1498 pwm->TZDCSEL |= tripZoneEvent << 6;
1499
1500 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1501
1502 return;
1503 } // end of PWM_setTripZoneDCEventSelect_DCBEVT1() function
1504
1505
1506 void PWM_setTripZoneDCEventSelect_DCBEVT2(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent)
1507 {
1508 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1509
1510
1511 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1512
1513 // clear the bits
1514 pwm->TZDCSEL &= (~PWM_TZDCSEL_DCBEVT2_BITS);
1515
1516 // set the bits
1517 pwm->TZDCSEL |= tripZoneEvent << 9;
1518
1519 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1520
1521 return;
1522 } // end of PWM_setTripZoneDCEventSelect_DCBEVT2() function
1523
1524
1525 void PWM_setTripZoneState_DCAEVT1(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
1526 {
1527 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1528
1529
1530 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1531
1532 // clear the bits
1533 pwm->TZCTL &= (~PWM_TZCTL_DCAEVT1_BITS);
1534
1535 // set the bits
1536 pwm->TZCTL |= tripZoneState << 4;
1537
1538 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1539
1540 return;
1541 } // end of PWM_setTripZoneState_DCAEVT1() function
1542
1543
1544 void PWM_setTripZoneState_DCAEVT2(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
1545 {
1546 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1547
1548
1549 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1550
1551 // clear the bits
1552 pwm->TZCTL &= (~PWM_TZCTL_DCAEVT2_BITS);
1553
1554 // set the bits
1555 pwm->TZCTL |= tripZoneState << 6;
1556
1557 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1558
1559 return;
1560 } // end of PWM_setTripZoneState_DCAEVT2() function
1561
1562
1563 void PWM_setTripZoneState_DCBEVT1(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
1564 {
1565 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1566
1567
1568 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1569
1570 // clear the bits
1571 pwm->TZCTL &= (~PWM_TZCTL_DCBEVT1_BITS);
1572
1573 // set the bits
1574 pwm->TZCTL |= tripZoneState << 8;
1575
1576 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1577
1578 return;
1579 } // end of PWM_setTripZoneState_DCBEVT1() function
1580
1581
1582 void PWM_setTripZoneState_DCBEVT2(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
1583 {
1584 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1585
1586
1587 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1588
1589 // clear the bits
1590 pwm->TZCTL &= (~PWM_TZCTL_DCBEVT2_BITS);
1591
1592 // set the bits
1593 pwm->TZCTL |= tripZoneState << 10;
1594
1595 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1596
1597 return;
1598 } // end of PWM_setTripZoneState_DCBEVT2() function
1599
1600
1601 void PWM_setTripZoneState_TZA(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
1602 {
1603 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1604
1605
1606 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1607
1608 // clear the bits
1609 pwm->TZCTL &= (~PWM_TZCTL_TZA_BITS);
1610
1611 // set the bits
1612 pwm->TZCTL |= tripZoneState << 0;
1613
1614 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1615
1616 return;
1617 } // end of PWM_setTripZoneState_TZA() function
1618
1619
1620 void PWM_setTripZoneState_TZB(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
1621 {
1622 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1623
1624
1625 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1626
1627 // clear the bits
1628 pwm->TZCTL &= (~PWM_TZCTL_TZB_BITS);
1629
1630 // set the bits
1631 pwm->TZCTL |= tripZoneState << 2;
1632
1633 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1634
1635 return;
1636 } // end of PWM_setTripZoneState_TZB() function
1637
1638
1639 // end of file
_PWM_Obj_::TBCTL
volatile uint16_t TBCTL
Time-Base Control Register.
Definition: pwm.h:875
PWM_ClkDiv_e
PWM_ClkDiv_e
Enumeration to define the pulse width modulation (PWM) clock dividers.
Definition: pwm.h:481
PWM_getDeadBandFallingEdgeDelay
uint16_t PWM_getDeadBandFallingEdgeDelay(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) deadband falling edge delay.
Definition: pwm.c:476
PWM_TZCTL_TZB_BITS
#define PWM_TZCTL_TZB_BITS
Defines the location of the TZB bits in the TZCTL register.
Definition: pwm.h:360
PWM_ActionQual_e
PWM_ActionQual_e
Enumeration to define the pulse width modulation (PWM) action qualifiers.
Definition: pwm.h:460
PWM_getDeadBandRisingEdgeDelay
uint16_t PWM_getDeadBandRisingEdgeDelay(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) deadband rising edge delay.
Definition: pwm.c:484
PWM_setIntMode
void PWM_setIntMode(PWM_Handle pwmHandle, const PWM_IntMode_e intMode)
Sets the pulse width modulation (PWM) interrupt mode.
Definition: pwm.c:1190
PWM_setClkDiv
void PWM_setClkDiv(PWM_Handle pwmHandle, const PWM_ClkDiv_e clkDiv)
Sets the pulse width modulation (PWM) clock divisor.
Definition: pwm.c:899
PWM_decrementDeadBandFallingEdgeDelay
void PWM_decrementDeadBandFallingEdgeDelay(PWM_Handle pwmHandle)
Decrement the dead band falling edge delay.
Definition: pwm.c:71
PWM_disableTripZones
void PWM_disableTripZones(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) trip zones.
Definition: pwm.c:251
PWM_setDigitalCompareBEvent2
void PWM_setDigitalCompareBEvent2(PWM_Handle pwmHandle, const bool selectFilter, const bool disableSync)
Sets the pulse width modulation (PWM) digital compare B event 2 source parameters.
Definition: pwm.c:1155
DISABLE_PROTECTED_REGISTER_WRITE_MODE
#define DISABLE_PROTECTED_REGISTER_WRITE_MODE
Define to disable protected register writes.
Definition: cpu.h:101
PWM_disableDigitalCompareBlankingWindow
void PWM_disableDigitalCompareBlankingWindow(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) digital compare blanking window.
Definition: pwm.c:155
_PWM_Obj_::AQCTLA
volatile uint16_t AQCTLA
Action-Qualifier Control Register for Output A (EPWMxA)
Definition: pwm.h:886
pwm.h
Contains public interface to various functions related to the pulse width modulation (PWM) object...
PWM_DeadBandOutputMode_e
PWM_DeadBandOutputMode_e
Enumeration to define the pulse width modulation (PWM) deadband output modes.
Definition: pwm.h:570
PWM_HRPCTL_HRPE_BITS
#define PWM_HRPCTL_HRPE_BITS
Defines the location of the HRPE bits in the HRPCTL register.
Definition: pwm.h:278
PWM_setTripZoneState_DCBEVT1
void PWM_setTripZoneState_DCBEVT1(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
Sets the pulse width modulation (PWM) trip zone state for Digital Compare Output B Event 1 (DCBEVT1) ...
Definition: pwm.c:1563
PWM_decrementDeadBandRisingEdgeDelay
void PWM_decrementDeadBandRisingEdgeDelay(PWM_Handle pwmHandle)
Decrement the dead band rising edge delay.
Definition: pwm.c:82
PWM_setDigitalCompareFilterWindow
void PWM_setDigitalCompareFilterWindow(PWM_Handle pwmHandle, const uint16_t window)
Sets the pulse width modulation (PWM) digital compare filter offset.
Definition: pwm.c:1059
PWM_setLoadMode_CmpA
void PWM_setLoadMode_CmpA(PWM_Handle pwmHandle, const PWM_LoadMode_e loadMode)
Sets the pulse width modulation (PWM) load mode for CMPA.
Definition: pwm.c:1220
PWM_PeriodLoad_e
PWM_PeriodLoad_e
Enumeration to define the pulse width modulation (PWM) period load options.
Definition: pwm.h:730
PWM_setRunMode
void PWM_setRunMode(PWM_Handle pwmHandle, const PWM_RunMode_e runMode)
Sets the pulse width modulation (PWM) run mode.
Definition: pwm.c:1318
PWM_TBCTL_PHSEN_BITS
#define PWM_TBCTL_PHSEN_BITS
Defines the location of the PHSEN bits in the TBCTL register.
Definition: pwm.h:294
PWM_AQCTL_CAU_BITS
#define PWM_AQCTL_CAU_BITS
Defines the location of the CAU bits in the AQCTL register.
Definition: pwm.h:109
PWM_TZDCSEL_DCBEVT2_BITS
#define PWM_TZDCSEL_DCBEVT2_BITS
Defines the location of the DCBEVT2 bits in the TZDCSEL register.
Definition: pwm.h:418
PWM_ETPS_SOCACNT_BITS
#define PWM_ETPS_SOCACNT_BITS
Defines the location of the SOCACNT bits in the ETPS register.
Definition: pwm.h:200
PWM_HRCNFG_CTLMODE_BITS
#define PWM_HRCNFG_CTLMODE_BITS
Defines the location of the CTLMODE bits in the HRCNFG register.
Definition: pwm.h:258
PWM_PCCTL_OSHTWTH_BITS
#define PWM_PCCTL_OSHTWTH_BITS
Defines the location of the OSHTWTH bits in the PCCTL register.
Definition: pwm.h:242
PWM_TBCTL_CTRMODE_BITS
#define PWM_TBCTL_CTRMODE_BITS
Defines the location of the CTRMODE bits in the TBCTL register.
Definition: pwm.h:290
PWM_disableSocAPulse
void PWM_disableSocAPulse(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) start of conversion (SOC) B pulse generation.
Definition: pwm.c:227
PWM_ETSEL_INTSEL_BITS
#define PWM_ETSEL_INTSEL_BITS
Defines the location of the INTSEL bits in the ETSEL register.
Definition: pwm.h:213
_PWM_Obj_::TZEINT
volatile uint16_t TZEINT
Trip zone interrupt enable.
Definition: pwm.h:896
PWM_ETSEL_SOCASEL_BITS
#define PWM_ETSEL_SOCASEL_BITS
Defines the location of the SOCASEL bits in the ETSEL register.
Definition: pwm.h:221
PWM_ETPS_SOCAPRD_BITS
#define PWM_ETPS_SOCAPRD_BITS
Defines the location of the SOCAPRD bits in the ETPS register.
Definition: pwm.h:196
PWM_CMPCTL_LOADAMODE_BITS
#define PWM_CMPCTL_LOADAMODE_BITS
Defines the location of the LOADAMODE bits in the CMPCTL register.
Definition: pwm.h:133
_PWM_Obj_::DBRED
volatile uint16_t DBRED
Dead-band rising edge delay.
Definition: pwm.h:891
PWM_getSocBCount
uint16_t PWM_getSocBCount(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) start of conversion (SOC) B count.
Definition: pwm.c:515
_PWM_Obj_::TBPHS
volatile uint16_t TBPHS
Time-Base Phase Register.
Definition: pwm.h:878
PWM_DigitalCompare_PulseSel_e
PWM_DigitalCompare_PulseSel_e
Enumeration to define the pulse width modulation (PWM) digital compare blanking pulse select...
Definition: pwm.h:627
PWM_TZCTL_DCBEVT1_BITS
#define PWM_TZCTL_DCBEVT1_BITS
Defines the location of the DCBEVT1 bits in the TZCTL register.
Definition: pwm.h:372
PWM_setPeriodLoad
void PWM_setPeriodLoad(PWM_Handle pwmHandle, const PWM_PeriodLoad_e periodLoad)
Sets the pulse width modulation (PWM) period load mode.
Definition: pwm.c:1303
PWM_setTripZoneState_TZA
void PWM_setTripZoneState_TZA(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
Sets the pulse width modulation (PWM) trip zone state for Output A (TZA)
Definition: pwm.c:1601
PWM_ChoppingDutyCycle_e
PWM_ChoppingDutyCycle_e
Enumeration to define the pulse width modulation (PWM) chopping clock duty cycles.
Definition: pwm.h:511
_PWM_Obj_::DBFED
volatile uint16_t DBFED
Dead-band falling edge delay.
Definition: pwm.h:892
_PWM_Obj_::AQCTLB
volatile uint16_t AQCTLB
Action-Qualifier Control Register for Output B (EPWMxB)
Definition: pwm.h:887
PWM_AQCSFRC_CSFA_BITS
#define PWM_AQCSFRC_CSFA_BITS
Defines the location of the CSFA bits in the AQCSFRC register.
Definition: pwm.h:125
PWM_LoadMode_e
PWM_LoadMode_e
Enumeration to define the pulse width modulation (PWM) load modes.
Definition: pwm.h:704
PWM_setTripZoneDCEventSelect_DCBEVT1
void PWM_setTripZoneDCEventSelect_DCBEVT1(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent)
Sets the pulse width modulation (PWM) trip zone digital compare event select for Digital Compare Outp...
Definition: pwm.c:1487
PWM_ShadowMode_e
PWM_ShadowMode_e
Enumeration to define the pulse width modulation (PWM) shadow modes.
Definition: pwm.h:759
PWM_HrControlMode_e
PWM_HrControlMode_e
Enumeration to define the pulse width modulation (PWM) high resolution control mode options...
Definition: pwm.h:650
PWM_CounterMode_e
PWM_CounterMode_e
Enumeration to define the pulse width modulation (PWM) counter modes.
Definition: pwm.h:548
PWM_enableHrPeriod
void PWM_enableHrPeriod(PWM_Handle pwmHandle)
Enables high resolution period control.
Definition: pwm.c:379
PWM_setActionQualContSWForce_PwmA
void PWM_setActionQualContSWForce_PwmA(PWM_Handle pwmHandle, const PWM_ActionQualContSWForce_e actionQualContSWForce)
Sets the pulse width modulation (PWM) object Continuous Software Force action for PWM A...
Definition: pwm.c:764
PWM_setTripZoneState_DCAEVT1
void PWM_setTripZoneState_DCAEVT1(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
Sets the pulse width modulation (PWM) trip zone state for Digital Compare Output A Event 1 (DCAEVT1) ...
Definition: pwm.c:1525
PWM_setHrShadowMode
void PWM_setHrShadowMode(PWM_Handle pwmHandle, const PWM_HrShadowMode_e shadowMode)
Set the High Resolution Shadow Load Mode.
Definition: pwm.c:590
PWM_setDeadBandRisingEdgeDelay
void PWM_setDeadBandRisingEdgeDelay(PWM_Handle pwmHandle, const uint16_t delay)
Sets the pulse width modulation (PWM) deadband rising edge delay.
Definition: pwm.c:997
PWM_TZCTL_DCAEVT2_BITS
#define PWM_TZCTL_DCAEVT2_BITS
Defines the location of the DCAEVT2 bits in the TZCTL register.
Definition: pwm.h:368
PWM_setCount
void PWM_setCount(PWM_Handle pwmHandle, const uint16_t count)
Sets the pulse width modulation (PWM) count.
Definition: pwm.c:914
PWM_setLoadMode_CmpB
void PWM_setLoadMode_CmpB(PWM_Handle pwmHandle, const PWM_LoadMode_e loadMode)
Sets the pulse width modulation (PWM) load mode for CMPB.
Definition: pwm.c:1235
PWM_enableDigitalCompareBlankingWindow
void PWM_enableDigitalCompareBlankingWindow(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) digital compare blanking window.
Definition: pwm.c:349
_PWM_Obj_::CMPCTL
volatile uint16_t CMPCTL
Counter-Compare Control Register.
Definition: pwm.h:882
PWM_setDigitalCompareInput
void PWM_setDigitalCompareInput(PWM_Handle pwmHandle, const PWM_DigitalCompare_Input_e input, const PWM_DigitalCompare_InputSel_e inputSel)
Sets the pulse width modulation (PWM) digital compare input.
Definition: pwm.c:1071
PWM_DeadBandPolarity_e
PWM_DeadBandPolarity_e
Enumeration to define the pulse width modulation (PWM) deadband polarity.
Definition: pwm.h:581
PWM_CMPCTL_SHDWBMODE_BITS
#define PWM_CMPCTL_SHDWBMODE_BITS
Defines the location of the SHDWBMODE bits in the CMPCTL register.
Definition: pwm.h:145
PWM_setTripZoneState_TZB
void PWM_setTripZoneState_TZB(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
Sets the pulse width modulation (PWM) trip zone state for Output B (TZB)
Definition: pwm.c:1620
PWM_setSyncMode
void PWM_setSyncMode(PWM_Handle pwmHandle, const PWM_SyncMode_e syncMode)
Sets the pulse width modulation (PWM) sync mode.
Definition: pwm.c:1435
PWM_ShadowStatus_e
PWM_ShadowStatus_e
Enumeration to define the pulse width modulation (PWM) shadow status options.
Definition: pwm.h:768
PWM_setActionQual_Period_PwmA
void PWM_setActionQual_Period_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM A when the counter equals the period...
Definition: pwm.c:794
PWM_disableDigitalCompareBlankingWindowInversion
void PWM_disableDigitalCompareBlankingWindowInversion(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) digital compare blanking window inversion.
Definition: pwm.c:170
PWM_AQCSFRC_CSFB_BITS
#define PWM_AQCSFRC_CSFB_BITS
Defines the location of the CSFB bits in the AQCSFRC register.
Definition: pwm.h:129
PWM_setDigitalCompareBlankingPulse
void PWM_setDigitalCompareBlankingPulse(PWM_Handle pwmHandle, const PWM_DigitalCompare_PulseSel_e pulseSelect)
Sets the pulse width modulation (PWM) digital compare blanking pulse.
Definition: pwm.c:1028
PWM_Handle
struct _PWM_Obj_ * PWM_Handle
Defines the pulse width modulation (PWM) handle.
Definition: pwm.h:935
PWM_ETSEL_SOCBSEL_BITS
#define PWM_ETSEL_SOCBSEL_BITS
Defines the location of the SOCBSEL bits in the ETSEL register.
Definition: pwm.h:229
PWM_TripZoneFlag_e
PWM_TripZoneFlag_e
Enumeration to define the pulse width modulation (PWM) trip zone states.
Definition: pwm.h:847
PWM_enableSocBPulse
void PWM_enableSocBPulse(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) start of conversion (SOC) B pulse generation.
Definition: pwm.c:433
_PWM_Obj_::TZCTL
volatile uint16_t TZCTL
Trip zone control.
Definition: pwm.h:895
_PWM_Obj_::PCCTL
volatile uint16_t PCCTL
PWM chopper control.
Definition: pwm.h:905
PWM_setHrEdgeMode
void PWM_setHrEdgeMode(PWM_Handle pwmHandle, const PWM_HrEdgeMode_e edgeMode)
Set the High Resolution Edge Mode.
Definition: pwm.c:574
PWM_setShadowMode_CmpB
void PWM_setShadowMode_CmpB(PWM_Handle pwmHandle, const PWM_ShadowMode_e shadowMode)
Sets the pulse width modulation (PWM) shadow mode for CMPB.
Definition: pwm.c:1408
PWM_setActionQual_CntDown_CmpB_PwmA
void PWM_setActionQual_CntDown_CmpB_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM A when the counter equals CMPB and the co...
Definition: pwm.c:674
PWM_disableDeadBandHalfCycle
void PWM_disableDeadBandHalfCycle(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) deadband half cycle clocking.
Definition: pwm.c:143
PWM_getSocACount
uint16_t PWM_getSocACount(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) start of conversion (SOC) A count.
Definition: pwm.c:502
PWM_clearTripZone
void PWM_clearTripZone(PWM_Handle pwmHandle, const PWM_TripZoneFlag_e tripZoneFlag)
Clears the trip zone (TZ) flag specified.
Definition: pwm.c:56
PWM_HrShadowMode_e
PWM_HrShadowMode_e
Enumeration to define the pulse width modulation (PWM) high resolution shadow load mode options...
Definition: pwm.h:670
PWM_disableDeadBand
void PWM_disableDeadBand(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) deadband.
Definition: pwm.c:131
PWM_TZDCSEL_DCAEVT2_BITS
#define PWM_TZDCSEL_DCAEVT2_BITS
Defines the location of the DCAEVT2 bits in the TZDCSEL register.
Definition: pwm.h:410
PWM_HRCNFG_EDGMODE_BITS
#define PWM_HRCNFG_EDGMODE_BITS
Defines the location of the EDGMODE bits in the HRCNFG register.
Definition: pwm.h:254
_PWM_Obj_::HRPCTL
volatile uint16_t HRPCTL
High Resolution Period Control.
Definition: pwm.h:912
PWM_ETSEL_INTEN_BITS
#define PWM_ETSEL_INTEN_BITS
Defines the location of the INTEN bits in the ETSEL register.
Definition: pwm.h:217
PWM_AQCTL_CBU_BITS
#define PWM_AQCTL_CBU_BITS
Defines the location of the CBU bits in the AQCTL register.
Definition: pwm.h:117
PWM_setDigitalCompareAEvent2
void PWM_setDigitalCompareAEvent2(PWM_Handle pwmHandle, const bool selectFilter, const bool disableSync)
Sets the pulse width modulation (PWM) digital compare A event 2 source parameters.
Definition: pwm.c:1113
PWM_disableSocBPulse
void PWM_disableSocBPulse(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) start of conversion (SOC) B pulse generation.
Definition: pwm.c:239
PWM_TZCTL_DCBEVT2_BITS
#define PWM_TZCTL_DCBEVT2_BITS
Defines the location of the DCBEVT2 bits in the TZCTL register.
Definition: pwm.h:376
PWM_setChoppingDutyCycle
void PWM_setChoppingDutyCycle(PWM_Handle pwmHandle, const PWM_ChoppingDutyCycle_e dutyCycle)
Sets the pulse width modulation (PWM) chopping clock duty cycle.
Definition: pwm.c:869
PWM_setSocBPulseSrc
void PWM_setSocBPulseSrc(PWM_Handle pwmHandle, const PWM_SocPulseSrc_e pulseSrc)
Sets the pulse width modulation (PWM) start of conversion (SOC) B interrupt pulse source...
Definition: pwm.c:1378
PWM_HRPCTL_TBPHSHRLOADE_BITS
#define PWM_HRPCTL_TBPHSHRLOADE_BITS
Defines the location of the TBPHSHRLOADE bits in the HRPCTL register.
Definition: pwm.h:286
PWM_HRCNFG_AUTOCONV_BITS
#define PWM_HRCNFG_AUTOCONV_BITS
Defines the location of the AUTOCONV bits in the HRCNFG register.
Definition: pwm.h:270
PWM_setDigitalCompareFilterOffset
void PWM_setDigitalCompareFilterOffset(PWM_Handle pwmHandle, const uint16_t offset)
Sets the pulse width modulation (PWM) digital compare filter offset.
Definition: pwm.c:1047
PWM_enableHrPhaseSync
void PWM_enableHrPhaseSync(PWM_Handle pwmHandle)
Enables high resolution phase synchronization.
Definition: pwm.c:406
PWM_setActionQual_Period_PwmB
void PWM_setActionQual_Period_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM B when the counter equals the period...
Definition: pwm.c:809
_PWM_Obj_::TZCLR
volatile uint16_t TZCLR
Trip zone clear.
Definition: pwm.h:898
PWM_AQCTL_ZRO_BITS
#define PWM_AQCTL_ZRO_BITS
Defines the location of the ZRO bits in the AQCTL register.
Definition: pwm.h:101
_PWM_Obj_::DCBCTL
volatile uint16_t DCBCTL
Digital Compare B Control.
Definition: pwm.h:921
PWM_setDigitalCompareAEvent1
void PWM_setDigitalCompareAEvent1(PWM_Handle pwmHandle, const bool selectFilter, const bool disableSync, const bool enableSoc, const bool generateSync)
Sets the pulse width modulation (PWM) digital compare A event 1 source parameters.
Definition: pwm.c:1091
PWM_disableCounterLoad
void PWM_disableCounterLoad(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) counter loading from the phase register.
Definition: pwm.c:119
ENABLE_PROTECTED_REGISTER_WRITE_MODE
#define ENABLE_PROTECTED_REGISTER_WRITE_MODE
Define to allow protected register writes.
Definition: cpu.h:93
_PWM_Obj_::HRCNFG
volatile uint16_t HRCNFG
HRPWM Config Reg.
Definition: pwm.h:907
PWM_SyncMode_e
PWM_SyncMode_e
Enumeration to define the pulse width modulation (PWM) sync modes.
Definition: pwm.h:803
_PWM_Obj_::DCACTL
volatile uint16_t DCACTL
Digital Compare A Control.
Definition: pwm.h:920
PWM_disableChopping
void PWM_disableChopping(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) chopping.
Definition: pwm.c:108
PWM_setTripZoneState_DCBEVT2
void PWM_setTripZoneState_DCBEVT2(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
Sets the pulse width modulation (PWM) trip zone state for Digital Compare Output B Event 2 (DCBEVT1) ...
Definition: pwm.c:1582
PWM_setActionQual_Zero_PwmA
void PWM_setActionQual_Zero_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM A when the counter equals the zero...
Definition: pwm.c:824
PWM_AQCTL_CAD_BITS
#define PWM_AQCTL_CAD_BITS
Defines the location of the CAD bits in the AQCTL register.
Definition: pwm.h:113
PWM_DigitalCompare_InputSel_e
PWM_DigitalCompare_InputSel_e
Enumeration to define the pulse width modulation (PWM) digital compare input choices.
Definition: pwm.h:603
_PWM_Obj_::ETPS
volatile uint16_t ETPS
Event trigger pre-scaler.
Definition: pwm.h:901
PWM_ActionQualContSWForce_e
PWM_ActionQualContSWForce_e
Enumeration to define the pulse width modulation (PWM) Action-qualifier Continuous Software Force...
Definition: pwm.h:471
PWM_CMPCTL_SHDWAFULL_BITS
#define PWM_CMPCTL_SHDWAFULL_BITS
Defines the location of the SHDWAFULL bits in the CMPCTL register.
Definition: pwm.h:149
PWM_TBCTL_PHSDIR_BITS
#define PWM_TBCTL_PHSDIR_BITS
Defines the location of the PHSDIR bits in the TBCTL register.
Definition: pwm.h:318
PWM_enableTripZoneInt
void PWM_enableTripZoneInt(PWM_Handle pwmHandle, const PWM_TripZoneFlag_e interruptSource)
Enables the pulse width modulation (PWM) trip zones interrupts.
Definition: pwm.c:445
PWM_DBCTL_HALFCYCLE_BITS
#define PWM_DBCTL_HALFCYCLE_BITS
Defines the location of the HALFCYCLE bits in the DBCTL register.
Definition: pwm.h:170
PWM_TBCTL_CLKDIV_BITS
#define PWM_TBCTL_CLKDIV_BITS
Defines the location of the CLKDIV bits in the TBCTL register.
Definition: pwm.h:314
PWM_setHighSpeedClkDiv
void PWM_setHighSpeedClkDiv(PWM_Handle pwmHandle, const PWM_HspClkDiv_e clkDiv)
Sets the pulse width modulation (PWM) high speed clock divisor.
Definition: pwm.c:1175
PWM_setDeadBandInputMode
void PWM_setDeadBandInputMode(PWM_Handle pwmHandle, const PWM_DeadBandInputMode_e inputMode)
Sets the pulse width modulation (PWM) deadband input mode.
Definition: pwm.c:952
_PWM_Obj_
Defines the pulse width modulation (PWM) object.
Definition: pwm.h:873
_PWM_Obj_::DCTRIPSEL
volatile uint16_t DCTRIPSEL
Digital Compare Trip Select.
Definition: pwm.h:919
PWM_setTripZoneState_DCAEVT2
void PWM_setTripZoneState_DCAEVT2(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
Sets the pulse width modulation (PWM) trip zone state for Digital Compare Output A Event 2 (DCAEVT1) ...
Definition: pwm.c:1544
_PWM_Obj_::ETSEL
volatile uint16_t ETSEL
Event trigger selection.
Definition: pwm.h:900
PWM_enableCounterLoad
void PWM_enableCounterLoad(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) counter loading from the phase register. ...
Definition: pwm.c:325
PWM_setTripZoneDCEventSelect_DCBEVT2
void PWM_setTripZoneDCEventSelect_DCBEVT2(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent)
Sets the pulse width modulation (PWM) trip zone digital compare event select for Digital Compare Outp...
Definition: pwm.c:1506
PWM_enableAutoConvert
void PWM_enableAutoConvert(PWM_Handle pwmHandle)
Enables auto conversion of delay line value.
Definition: pwm.c:299
PWM_init
PWM_Handle PWM_init(void *pMemory, const size_t numBytes)
Initializes the pulse width modulation (PWM) object handle.
Definition: pwm.c:628
PWM_TBCTL_SYNCOSEL_BITS
#define PWM_TBCTL_SYNCOSEL_BITS
Defines the location of the SYNCOSEL bits in the TBCTL register.
Definition: pwm.h:302
PWM_enableSocAPulse
void PWM_enableSocAPulse(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) start of conversion (SOC) A pulse generation.
Definition: pwm.c:421
PWM_TripZoneState_e
PWM_TripZoneState_e
Enumeration to define the pulse width modulation (PWM) trip zone states.
Definition: pwm.h:837
PWM_IntMode_e
PWM_IntMode_e
Enumeration to define the pulse width modulation (PWM) interrupt generation modes.
Definition: pwm.h:679
PWM_setActionQual_CntDown_CmpB_PwmB
void PWM_setActionQual_CntDown_CmpB_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM B when the counter equals CMPB and the co...
Definition: pwm.c:689
_PWM_Obj_::TZDCSEL
volatile uint16_t TZDCSEL
Trip zone digital comparator select.
Definition: pwm.h:894
PWM_TZCTL_TZA_BITS
#define PWM_TZCTL_TZA_BITS
Defines the location of the TZA bits in the TZCTL register.
Definition: pwm.h:356
PWM_setChoppingPulseWidth
void PWM_setChoppingPulseWidth(PWM_Handle pwmHandle, const PWM_ChoppingPulseWidth_e pulseWidth)
Sets the pulse width modulation (PWM) chopping clock pulse width.
Definition: pwm.c:884
PWM_setHrControlMode
void PWM_setHrControlMode(PWM_Handle pwmHandle, const PWM_HrControlMode_e controlMode)
Set the High Resolution Control Mode.
Definition: pwm.c:558
PWM_setPhase
void PWM_setPhase(PWM_Handle pwmHandle, const uint16_t phase)
Sets the pulse width modulation (PWM) phase.
Definition: pwm.c:1277
PWM_ChoppingPulseWidth_e
PWM_ChoppingPulseWidth_e
Enumeration to define the pulse width modulation (PWM) chopping clock pulse widths.
Definition: pwm.h:525
PWM_setDeadBandOutputMode
void PWM_setDeadBandOutputMode(PWM_Handle pwmHandle, const PWM_DeadBandOutputMode_e outputMode)
Sets the pulse width modulation (PWM) deadband output mode.
Definition: pwm.c:967
PWM_DeadBandInputMode_e
PWM_DeadBandInputMode_e
Enumeration to define the pulse width modulation (PWM) deadband options.
Definition: pwm.h:559
PWM_DBCTL_INMODE_BITS
#define PWM_DBCTL_INMODE_BITS
Defines the location of the INMODE bits in the DBCTL register.
Definition: pwm.h:166
_PWM_Obj_::DBCTL
volatile uint16_t DBCTL
Dead-band control.
Definition: pwm.h:890
PWM_ETPS_SOCBCNT_BITS
#define PWM_ETPS_SOCBCNT_BITS
Defines the location of the SOCBCNT bits in the ETPS register.
Definition: pwm.h:208
PWM_setTripZoneDCEventSelect_DCAEVT1
void PWM_setTripZoneDCEventSelect_DCAEVT1(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent)
Sets the pulse width modulation (PWM) trip zone digital compare event select for Digital Compare Outp...
Definition: pwm.c:1449
PWM_PhaseDir_e
PWM_PhaseDir_e
Enumeration to define the pulse width modulation (PWM) phase direction modes.
Definition: pwm.h:739
PWM_RunMode_e
PWM_RunMode_e
Enumeration to define the pulse width modulation (PWM) run modes.
Definition: pwm.h:748
PWM_DCFCTL_PULSESEL_BITS
#define PWM_DCFCTL_PULSESEL_BITS
Defines the location of the PULSESEL bits in the DCFCTL register.
Definition: pwm.h:452
PWM_disableHrPhaseSync
void PWM_disableHrPhaseSync(PWM_Handle pwmHandle)
Disables high resolution phase synchronization.
Definition: pwm.c:200
_PWM_Obj_::DCFCTL
volatile uint16_t DCFCTL
Digital Compare Filter Control.
Definition: pwm.h:922
PWM_setChoppingClkFreq
void PWM_setChoppingClkFreq(PWM_Handle pwmHandle, const PWM_ChoppingClkFreq_e clkFreq)
Sets the pulse width modulation (PWM) chopping clock frequency.
Definition: pwm.c:854
PWM_setTripZoneDCEventSelect_DCAEVT2
void PWM_setTripZoneDCEventSelect_DCAEVT2(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent)
Sets the pulse width modulation (PWM) trip zone digital compare event select for Digital Compare Outp...
Definition: pwm.c:1468
_PWM_Obj_::TZSEL
volatile uint16_t TZSEL
Trip zone select.
Definition: pwm.h:893
PWM_IntPeriod_e
PWM_IntPeriod_e
Enumeration to define the pulse width modulation (PWM) interrupt period options.
Definition: pwm.h:693
PWM_enableInt
void PWM_enableInt(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) interrupt.
Definition: pwm.c:394
PWM_disableAutoConvert
void PWM_disableAutoConvert(PWM_Handle pwmHandle)
Disables auto conversion of delay line value.
Definition: pwm.c:93
_PWM_Obj_::AQCSFRC
volatile uint16_t AQCSFRC
Action qualifier continuous SW force.
Definition: pwm.h:889
PWM_DBCTL_POLSEL_BITS
#define PWM_DBCTL_POLSEL_BITS
Defines the location of the POLSEL bits in the DBCTL register.
Definition: pwm.h:162
PWM_TripZoneDCEventSel_e
PWM_TripZoneDCEventSel_e
Enumeration to define the pulse width modulation (PWM) trip zone event selections.
Definition: pwm.h:860
PWM_DCFCTL_SRCSEL_BITS
#define PWM_DCFCTL_SRCSEL_BITS
Defines the location of the SRCSEL bits in the DCFCTL register.
Definition: pwm.h:440
PWM_SocPeriod_e
PWM_SocPeriod_e
Enumeration to define the pulse width modulation (PWM) start of conversion (SOC) period options...
Definition: pwm.h:777
_PWM_Obj_::TBPRD
volatile uint16_t TBPRD
Time-Base Period register set.
Definition: pwm.h:880
PWM_setSocAPulseSrc
void PWM_setSocAPulseSrc(PWM_Handle pwmHandle, const PWM_SocPulseSrc_e pulseSrc)
Sets the pulse width modulation (PWM) start of conversion (SOC) A interrupt pulse source...
Definition: pwm.c:1348
PWM_ETPS_INTPRD_BITS
#define PWM_ETPS_INTPRD_BITS
Defines the location of the INTPRD bits in the ETPS register.
Definition: pwm.h:188
PWM_DigitalCompare_FilterSrc_e
PWM_DigitalCompare_FilterSrc_e
Enumeration to define the pulse width modulation (PWM) digital compare filter sources.
Definition: pwm.h:616
PWM_TBCTL_FREESOFT_BITS
#define PWM_TBCTL_FREESOFT_BITS
Defines the location of the FREESOFT bits in the TBCTL register.
Definition: pwm.h:322
PWM_setSocBPeriod
void PWM_setSocBPeriod(PWM_Handle pwmHandle, const PWM_SocPeriod_e intPeriod)
Sets the pulse width modulation (PWM) start of conversion (SOC) B interrupt period.
Definition: pwm.c:1363
PWM_enableDigitalCompareBlankingWindowInversion
void PWM_enableDigitalCompareBlankingWindowInversion(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) digital compare blanking window inversion.
Definition: pwm.c:364
PWM_disableTripZoneInt
void PWM_disableTripZoneInt(PWM_Handle pwmHandle, const PWM_TripZoneFlag_e interruptSource)
Disables the pulse width modulation (PWM) trip zones interrupts.
Definition: pwm.c:267
PWM_SocPulseSrc_e
PWM_SocPulseSrc_e
Enumeration to define the pulse width modulation (PWM) start of conversion (SOC) sources.
Definition: pwm.h:788
PWM_getShadowStatus_CmpA
PWM_ShadowStatus_e PWM_getShadowStatus_CmpA(PWM_Handle pwmHandle)
Definition: pwm.c:528
PWM_setCounterMode
void PWM_setCounterMode(PWM_Handle pwmHandle, const PWM_CounterMode_e counterMode)
Sets the pulse width modulation (PWM) counter mode.
Definition: pwm.c:926
PWM_PCCTL_CHPFREQ_BITS
#define PWM_PCCTL_CHPFREQ_BITS
Defines the location of the CHPFREQ bits in the PCCTL register.
Definition: pwm.h:246
_PWM_Obj_::DCFWINDOW
volatile uint16_t DCFWINDOW
Digital Compare Filter Window.
Definition: pwm.h:926
PWM_setPeriodHr
void PWM_setPeriodHr(PWM_Handle pwmHandle, const uint16_t period)
Sets the pulse width modulation (PWM) high resolution period.
Definition: pwm.c:1262
PWM_TZDCSEL_DCAEVT1_BITS
#define PWM_TZDCSEL_DCAEVT1_BITS
Defines the location of the DCAEVT1 bits in the TZDCSEL register.
Definition: pwm.h:406
PWM_setActionQualContSWForce_PwmB
void PWM_setActionQualContSWForce_PwmB(PWM_Handle pwmHandle, const PWM_ActionQualContSWForce_e actionQualContSWForce)
Sets the pulse width modulation (PWM) object Continuous Software Force action for PWM B...
Definition: pwm.c:779
PWM_ETSEL_SOCBEN_BITS
#define PWM_ETSEL_SOCBEN_BITS
Defines the location of the SOCBEN bits in the ETSEL register.
Definition: pwm.h:233
PWM_ETSEL_SOCAEN_BITS
#define PWM_ETSEL_SOCAEN_BITS
Defines the location of the SOCAEN bits in the ETSEL register.
Definition: pwm.h:225
PWM_ETPS_INTCNT_BITS
#define PWM_ETPS_INTCNT_BITS
Defines the location of the INTCNT bits in the ETPS register.
Definition: pwm.h:192
PWM_setDeadBandFallingEdgeDelay
void PWM_setDeadBandFallingEdgeDelay(PWM_Handle pwmHandle, const uint16_t delay)
Sets the pulse width modulation (PWM) deadband falling edge delay.
Definition: pwm.c:941
PWM_DCFCTL_BLANKE_BITS
#define PWM_DCFCTL_BLANKE_BITS
Defines the location of the BLANKE bits in the DCFCTL register.
Definition: pwm.h:444
PWM_AQCTL_CBD_BITS
#define PWM_AQCTL_CBD_BITS
Defines the location of the CBD bits in the AQCTL register.
Definition: pwm.h:121
PWM_disableInt
void PWM_disableInt(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) interrupt.
Definition: pwm.c:215
PWM_setDigitalCompareBEvent1
void PWM_setDigitalCompareBEvent1(PWM_Handle pwmHandle, const bool selectFilter, const bool disableSync, const bool enableSoc, const bool generateSync)
Sets the pulse width modulation (PWM) digital compare B event 1 source parameters.
Definition: pwm.c:1133
PWM_setPhaseDir
void PWM_setPhaseDir(PWM_Handle pwmHandle, const PWM_PhaseDir_e phaseDir)
Sets the pulse width modulation (PWM) phase direction.
Definition: pwm.c:1288
PWM_setActionQual_CntDown_CmpA_PwmB
void PWM_setActionQual_CntDown_CmpA_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM B when the counter equals CMPA and the co...
Definition: pwm.c:659
PWM_HRCNFG_HRLOAD_BITS
#define PWM_HRCNFG_HRLOAD_BITS
Defines the location of the HRLOAD bits in the HRCNFG register.
Definition: pwm.h:262
PWM_TBCTL_HSPCLKDIV_BITS
#define PWM_TBCTL_HSPCLKDIV_BITS
Defines the location of the HSPCLKDIV bits in the TBCTL register.
Definition: pwm.h:310
PWM_enableChopping
void PWM_enableChopping(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) chopping.
Definition: pwm.c:314
PWM_disableHrPeriod
void PWM_disableHrPeriod(PWM_Handle pwmHandle)
Disables high resolution period control.
Definition: pwm.c:185
PWM_setSocAPeriod
void PWM_setSocAPeriod(PWM_Handle pwmHandle, const PWM_SocPeriod_e intPeriod)
Sets the pulse width modulation (PWM) start of conversion (SOC) A interrupt period.
Definition: pwm.c:1333
PWM_setIntPeriod
void PWM_setIntPeriod(PWM_Handle pwmHandle, const PWM_IntPeriod_e intPeriod)
Sets the pulse width modulation (PWM) interrupt period.
Definition: pwm.c:1205
PWM_TBCTL_PRDLD_BITS
#define PWM_TBCTL_PRDLD_BITS
Defines the location of the PRDLD bits in the TBCTL register.
Definition: pwm.h:298
PWM_setActionQual_CntUp_CmpB_PwmA
void PWM_setActionQual_CntUp_CmpB_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM A when the counter equals CMPB and the co...
Definition: pwm.c:734
PWM_setActionQual_CntUp_CmpB_PwmB
void PWM_setActionQual_CntUp_CmpB_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM B when the counter equals CMPB and the co...
Definition: pwm.c:749
PWM_incrementDeadBandFallingEdgeDelay
void PWM_incrementDeadBandFallingEdgeDelay(PWM_Handle pwmHandle)
Increment the dead band falling edge delay.
Definition: pwm.c:606
_PWM_Obj_::TBPRDHR
volatile uint16_t TBPRDHR
Time-Base Period High Resolution Register.
Definition: pwm.h:881
PWM_CMPCTL_SHDWAMODE_BITS
#define PWM_CMPCTL_SHDWAMODE_BITS
Defines the location of the SHDWAMODE bits in the CMPCTL register.
Definition: pwm.h:141
_PWM_Obj_::TBCTR
volatile uint16_t TBCTR
Time-Base Counter.
Definition: pwm.h:879
PWM_setActionQual_Zero_PwmB
void PWM_setActionQual_Zero_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM B when the counter equals the zero...
Definition: pwm.c:839
PWM_setActionQual_CntUp_CmpA_PwmA
void PWM_setActionQual_CntUp_CmpA_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM A when the counter equals CMPA and the co...
Definition: pwm.c:704
PWM_PCCTL_CHPEN_BITS
#define PWM_PCCTL_CHPEN_BITS
Defines the location of the CHPEN bits in the PCCTL register.
Definition: pwm.h:238
PWM_DCFCTL_BLANKINV_BITS
#define PWM_DCFCTL_BLANKINV_BITS
Defines the location of the BLANKINV bits in the DCFCTL register.
Definition: pwm.h:448
PWM_AQCTL_PRD_BITS
#define PWM_AQCTL_PRD_BITS
Defines the location of the PRD bits in the AQCTL register.
Definition: pwm.h:105
PWM_incrementDeadBandRisingEdgeDelay
void PWM_incrementDeadBandRisingEdgeDelay(PWM_Handle pwmHandle)
Increment the dead band rising edge delay.
Definition: pwm.c:617
PWM_ETPS_SOCBPRD_BITS
#define PWM_ETPS_SOCBPRD_BITS
Defines the location of the SOCBPRD bits in the ETPS register.
Definition: pwm.h:204
PWM_ChoppingClkFreq_e
PWM_ChoppingClkFreq_e
Enumeration to define the pulse width modulation (PWM) chopping clock frequencies.
Definition: pwm.h:496
PWM_HspClkDiv_e
PWM_HspClkDiv_e
Enumeration to define the pulse width modulation (PWM) high speed clock divide options.
Definition: pwm.h:636
PWM_PCCTL_CHPDUTY_BITS
#define PWM_PCCTL_CHPDUTY_BITS
Defines the location of the CHPDUTY bits in the PCCTL register.
Definition: pwm.h:250
PWM_DigitalCompare_Input_e
PWM_DigitalCompare_Input_e
Enumeration to define the pulse width modulation (PWM) digital compare inputs.
Definition: pwm.h:592
PWM_setActionQual_CntUp_CmpA_PwmB
void PWM_setActionQual_CntUp_CmpA_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM B when the counter equals CMPA and the co...
Definition: pwm.c:719
PWM_setDigitalCompareFilterSource
void PWM_setDigitalCompareFilterSource(PWM_Handle pwmHandle, const PWM_DigitalCompare_FilterSrc_e input)
Sets the pulse width modulation (PWM) digital compare filter source.
Definition: pwm.c:1009
PWM_setSwSync
void PWM_setSwSync(PWM_Handle pwmHandle)
Sets the pulse width modulation (PWM) software sync.
Definition: pwm.c:1423
PWM_setShadowMode_CmpA
void PWM_setShadowMode_CmpA(PWM_Handle pwmHandle, const PWM_ShadowMode_e shadowMode)
Sets the pulse width modulation (PWM) shadow mode for CMPA.
Definition: pwm.c:1393
PWM_CMPCTL_LOADBMODE_BITS
#define PWM_CMPCTL_LOADBMODE_BITS
Defines the location of the LOADBMODE bits in the CMPCTL register.
Definition: pwm.h:137
_PWM_Obj_::DCFOFFSET
volatile uint16_t DCFOFFSET
Digital Compare Filter Offset.
Definition: pwm.h:924
PWM_TZCTL_DCAEVT1_BITS
#define PWM_TZCTL_DCAEVT1_BITS
Defines the location of the DCAEVT1 bits in the TZCTL register.
Definition: pwm.h:364
PWM_setPeriod
void PWM_setPeriod(PWM_Handle pwmHandle, const uint16_t period)
Sets the pulse width modulation (PWM) period.
Definition: pwm.c:1250
PWM_enableTripZoneSrc
void PWM_enableTripZoneSrc(PWM_Handle pwmHandle, const PWM_TripZoneSrc_e src)
Enable the pulse width modulation (PWM) trip zone source.
Definition: pwm.c:460
PWM_enableDeadBandHalfCycle
void PWM_enableDeadBandHalfCycle(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) deadband half cycle clocking.
Definition: pwm.c:337
PWM_TZDCSEL_DCBEVT1_BITS
#define PWM_TZDCSEL_DCBEVT1_BITS
Defines the location of the DCBEVT1 bits in the TZDCSEL register.
Definition: pwm.h:414
PWM_DBCTL_OUTMODE_BITS
#define PWM_DBCTL_OUTMODE_BITS
Defines the location of the OUTMODE bits in the DBCTL register.
Definition: pwm.h:158
PWM_disableTripZoneSrc
void PWM_disableTripZoneSrc(PWM_Handle pwmHandle, const PWM_TripZoneSrc_e src)
Disable the pulse width modulation (PWM) trip zone source.
Definition: pwm.c:283
PWM_HrEdgeMode_e
PWM_HrEdgeMode_e
Enumeration to define the pulse width modulation (PWM) high resolution edge mode options.
Definition: pwm.h:659
PWM_getShadowStatus_CmpB
PWM_ShadowStatus_e PWM_getShadowStatus_CmpB(PWM_Handle pwmHandle)
Definition: pwm.c:543
PWM_setActionQual_CntDown_CmpA_PwmA
void PWM_setActionQual_CntDown_CmpA_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM A when the counter equals CMPA and the co...
Definition: pwm.c:644
PWM_getIntCount
uint16_t PWM_getIntCount(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) interrupt event count.
Definition: pwm.c:492
PWM_TripZoneSrc_e
PWM_TripZoneSrc_e
Enumeration to define the pulse width modulation (PWM) trip zone sources.
Definition: pwm.h:814
PWM_setDeadBandPolarity
void PWM_setDeadBandPolarity(PWM_Handle pwmHandle, const PWM_DeadBandPolarity_e polarity)
Sets the pulse width modulation (PWM) deadband polarity.
Definition: pwm.c:982