MotorWare f2806x Driver API Documentation

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

pwm.h
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--*/
32 #ifndef _PWM_H_
33 #define _PWM_H_
34
41
42
43 // **************************************************************************
44 // the includes
45
46 #include "sw/modules/types/src/types.h"
47
48 #include "sw/drivers/cpu/src/32b/f28x/f2806x/cpu.h"
49
50
55
56
57
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61
62
63 // **************************************************************************
64 // the defines
65
66
69 #define PWM_ePWM1_BASE_ADDR (0x00006800)
70
73 #define PWM_ePWM2_BASE_ADDR (0x00006840)
74
77 #define PWM_ePWM3_BASE_ADDR (0x00006880)
78
81 #define PWM_ePWM4_BASE_ADDR (0x000068C0)
82
85 #define PWM_ePWM5_BASE_ADDR (0x00006900)
86
89 #define PWM_ePWM6_BASE_ADDR (0x00006940)
90
93 #define PWM_ePWM7_BASE_ADDR (0x00006980)
94
97 #define PWM_ePWM8_BASE_ADDR (0x000069C0)
98
101 #define PWM_AQCTL_ZRO_BITS (3 << 0)
102
105 #define PWM_AQCTL_PRD_BITS (3 << 2)
106
109 #define PWM_AQCTL_CAU_BITS (3 << 4)
110
113 #define PWM_AQCTL_CAD_BITS (3 << 6)
114
117 #define PWM_AQCTL_CBU_BITS (3 << 8)
118
121 #define PWM_AQCTL_CBD_BITS (3 << 10)
122
125 #define PWM_AQCSFRC_CSFA_BITS (3 << 0)
126
129 #define PWM_AQCSFRC_CSFB_BITS (3 << 2)
130
133 #define PWM_CMPCTL_LOADAMODE_BITS (3 << 0)
134
137 #define PWM_CMPCTL_LOADBMODE_BITS (3 << 2)
138
141 #define PWM_CMPCTL_SHDWAMODE_BITS (1 << 4)
142
145 #define PWM_CMPCTL_SHDWBMODE_BITS (1 << 6)
146
149 #define PWM_CMPCTL_SHDWAFULL_BITS (1 << 8)
150
153 #define PWM_CMPCTL_SHDWBFULL_BITS (1 << 9)
154
155
158 #define PWM_DBCTL_OUTMODE_BITS (3 << 0)
159
162 #define PWM_DBCTL_POLSEL_BITS (3 << 2)
163
166 #define PWM_DBCTL_INMODE_BITS (3 << 4)
167
170 #define PWM_DBCTL_HALFCYCLE_BITS (1 << 15)
171
172
175 #define PWM_ETCLR_INT_BITS (1 << 0)
176
179 #define PWM_ETCLR_SOCA_BITS (1 << 2)
180
183 #define PWM_ETCLR_SOCB_BITS (1 << 3)
184
185
188 #define PWM_ETPS_INTPRD_BITS (3 << 0)
189
192 #define PWM_ETPS_INTCNT_BITS (3 << 2)
193
196 #define PWM_ETPS_SOCAPRD_BITS (3 << 8)
197
200 #define PWM_ETPS_SOCACNT_BITS (3 << 10)
201
204 #define PWM_ETPS_SOCBPRD_BITS (3 << 12)
205
208 #define PWM_ETPS_SOCBCNT_BITS (3 << 14)
209
210
213 #define PWM_ETSEL_INTSEL_BITS (7 << 0)
214
217 #define PWM_ETSEL_INTEN_BITS (1 << 3)
218
221 #define PWM_ETSEL_SOCASEL_BITS (7 << 8)
222
225 #define PWM_ETSEL_SOCAEN_BITS (1 << 11)
226
229 #define PWM_ETSEL_SOCBSEL_BITS (7 << 12)
230
233 #define PWM_ETSEL_SOCBEN_BITS (1 << 15)
234
235
238 #define PWM_PCCTL_CHPEN_BITS (1 << 0)
239
242 #define PWM_PCCTL_OSHTWTH_BITS (15 << 1)
243
246 #define PWM_PCCTL_CHPFREQ_BITS (7 << 5)
247
250 #define PWM_PCCTL_CHPDUTY_BITS (7 << 8)
251
254 #define PWM_HRCNFG_EDGMODE_BITS (3 << 0)
255
258 #define PWM_HRCNFG_CTLMODE_BITS (1 << 2)
259
262 #define PWM_HRCNFG_HRLOAD_BITS (3 << 3)
263
266 #define PWM_HRCNFG_SELOUTB_BITS (1 << 5)
267
270 #define PWM_HRCNFG_AUTOCONV_BITS (1 << 6)
271
274 #define PWM_HRCNFG_SWAPAB_BITS (1 << 7)
275
278 #define PWM_HRPCTL_HRPE_BITS (1 << 0)
279
282 #define PWM_HRPCTL_PWMSYNCSEL_BITS (1 << 1)
283
286 #define PWM_HRPCTL_TBPHSHRLOADE_BITS (1 << 2)
287
290 #define PWM_TBCTL_CTRMODE_BITS (3 << 0)
291
294 #define PWM_TBCTL_PHSEN_BITS (1 << 2)
295
298 #define PWM_TBCTL_PRDLD_BITS (1 << 3)
299
302 #define PWM_TBCTL_SYNCOSEL_BITS (3 << 4)
303
306 #define PWM_TBCTL_SWFSYNC_BITS (1 << 6)
307
310 #define PWM_TBCTL_HSPCLKDIV_BITS (7 << 7)
311
314 #define PWM_TBCTL_CLKDIV_BITS (7 << 10)
315
318 #define PWM_TBCTL_PHSDIR_BITS (1 << 13)
319
322 #define PWM_TBCTL_FREESOFT_BITS (3 << 14)
323
324
327 #define PWM_TZCLR_INT_BITS (1 << 0)
328
331 #define PWM_TZCLR_CBC_BITS (1 << 1)
332
335 #define PWM_TZCLR_OST_BITS (1 << 2)
336
339 #define PWM_TZCLR_DCAEVT1_BITS (1 << 3)
340
343 #define PWM_TZCLR_DCAEVT2_BITS (1 << 4)
344
347 #define PWM_TZCLR_DCBEVT1_BITS (1 << 5)
348
351 #define PWM_TZCLR_DCBEVT2_BITS (1 << 6)
352
353
356 #define PWM_TZCTL_TZA_BITS (3 << 0)
357
360 #define PWM_TZCTL_TZB_BITS (3 << 2)
361
364 #define PWM_TZCTL_DCAEVT1_BITS (3 << 4)
365
368 #define PWM_TZCTL_DCAEVT2_BITS (3 << 6)
369
372 #define PWM_TZCTL_DCBEVT1_BITS (3 << 8)
373
376 #define PWM_TZCTL_DCBEVT2_BITS (3 << 10)
377
378
381 #define PWM_TZFRC_CBC_BITS (1 << 1)
382
385 #define PWM_TZFRC_OST_BITS (1 << 2)
386
389 #define PWM_TZFRC_DCAEVT1_BITS (1 << 3)
390
393 #define PWM_TZFRC_DCAEVT2_BITS (1 << 4)
394
397 #define PWM_TZFRC_DCBEVT1_BITS (1 << 5)
398
401 #define PWM_TZFRC_DCBEVT2_BITS (1 << 6)
402
403
406 #define PWM_TZDCSEL_DCAEVT1_BITS (7 << 0)
407
410 #define PWM_TZDCSEL_DCAEVT2_BITS (7 << 3)
411
414 #define PWM_TZDCSEL_DCBEVT1_BITS (7 << 6)
415
418 #define PWM_TZDCSEL_DCBEVT2_BITS (7 << 9)
419
420
423 #define PWM_DCTRIPSEL_DCAHCOMPSEL_BITS (15 << 0)
424
427 #define PWM_DCTRIPSEL_DCALCOMPSEL_BITS (15 << 4)
428
431 #define PWM_DCTRIPSEL_DCBHCOMPSEL_BITS (15 << 8)
432
435 #define PWM_DCTRIPSEL_DCBLCOMPSEL_BITS (15 << 12)
436
437
440 #define PWM_DCFCTL_SRCSEL_BITS (3 << 0)
441
444 #define PWM_DCFCTL_BLANKE_BITS (1 << 2)
445
448 #define PWM_DCFCTL_BLANKINV_BITS (1 << 3)
449
452 #define PWM_DCFCTL_PULSESEL_BITS (3 << 4)
453
454
455 // **************************************************************************
456 // the typedefs
457
460 typedef enum
461 {
462 PWM_ActionQual_Disabled=0,
463 PWM_ActionQual_Clear,
464 PWM_ActionQual_Set,
465 PWM_ActionQual_Toggle
466 } PWM_ActionQual_e;
467
468
471 typedef enum
472 {
473 PWM_ActionQualContSWForce_Disabled=0,
474 PWM_ActionQualContSWForce_Clear,
475 PWM_ActionQualContSWForce_Set
476 } PWM_ActionQualContSWForce_e;
477
478
481 typedef enum
482 {
483 PWM_ClkDiv_by_1=(0 << 10),
484 PWM_ClkDiv_by_2=(1 << 10),
485 PWM_ClkDiv_by_4=(2 << 10),
486 PWM_ClkDiv_by_8=(3 << 10),
487 PWM_ClkDiv_by_16=(4 << 10),
488 PWM_ClkDiv_by_32=(5 << 10),
489 PWM_ClkDiv_by_64=(6 << 10),
490 PWM_ClkDiv_by_128=(7 << 10)
491 } PWM_ClkDiv_e;
492
493
496 typedef enum
497 {
498 PWM_ChoppingClkFreq_SysClkOut_by_1=(0 << 5),
499 PWM_ChoppingClkFreq_SysClkOut_by_2=(1 << 5),
500 PWM_ChoppingClkFreq_SysClkOut_by_3=(2 << 5),
501 PWM_ChoppingClkFreq_SysClkOut_by_4=(3 << 5),
502 PWM_ChoppingClkFreq_SysClkOut_by_5=(4 << 5),
503 PWM_ChoppingClkFreq_SysClkOut_by_6=(5 << 5),
504 PWM_ChoppingClkFreq_SysClkOut_by_7=(6 << 5),
505 PWM_ChoppingClkFreq_SysClkOut_by_8=(7 << 5)
506 } PWM_ChoppingClkFreq_e;
507
508
511 typedef enum
512 {
513 PWM_ChoppingDutyCycle_One_Eighth=(0 << 8),
514 PWM_ChoppingDutyCycle_Two_Eighths=(1 << 8),
515 PWM_ChoppingDutyCycle_Three_Eighths=(2 << 8),
516 PWM_ChoppingDutyCycle_Four_Eighths=(3 << 8),
517 PWM_ChoppingDutyCycle_Five_Eighths=(4 << 8),
518 PWM_ChoppingDutyCycle_Six_Eighths=(5 << 8),
519 PWM_ChoppingDutyCycle_Seven_Eighths=(6 << 8)
520 } PWM_ChoppingDutyCycle_e;
521
522
525 typedef enum
526 {
527 PWM_ChoppingPulseWidth_One_Eighth_SysClkOut=(0 << 1),
528 PWM_ChoppingPulseWidth_Two_Eighths_SysClkOut=(1 << 1),
529 PWM_ChoppingPulseWidth_Three_Eighths_SysClkOut=(2 << 1),
530 PWM_ChoppingPulseWidth_Four_Eighths_SysClkOut=(3 << 1),
531 PWM_ChoppingPulseWidth_Five_Eighths_SysClkOut=(4 << 1),
532 PWM_ChoppingPulseWidth_Six_Eighths_SysClkOut=(5 << 1),
533 PWM_ChoppingPulseWidth_Seven_Eighths_SysClkOut=(6 << 1),
534 PWM_ChoppingPulseWidth_Eight_Eighths_SysClkOut=(7 << 1),
535 PWM_ChoppingPulseWidth_Nine_Eighths_SysClkOut=(8 << 1),
536 PWM_ChoppingPulseWidth_Ten_Eighths_SysClkOut=(9 << 1),
537 PWM_ChoppingPulseWidth_Eleven_Eighths_SysClkOut=(10 << 1),
538 PWM_ChoppingPulseWidth_Twelve_Eighths_SysClkOut=(11 << 1),
539 PWM_ChoppingPulseWidth_Thirteen_Eighths_SysClkOut=(12 << 1),
540 PWM_ChoppingPulseWidth_Fourteen_Eighths_SysClkOut=(13 << 1),
541 PWM_ChoppingPulseWidth_Fifteen_Eighths_SysClkOut=(14 << 1),
542 PWM_ChoppingPulseWidth_Sixteen_Eighths_SysClkOut=(15 << 1)
543 } PWM_ChoppingPulseWidth_e;
544
545
548 typedef enum
549 {
550 PWM_CounterMode_Up=(0 << 0),
551 PWM_Countermode_Down=(1 << 0),
552 PWM_CounterMode_UpDown=(2 << 0),
553 PWM_CounterMode_Stop=(3 << 0)
554 } PWM_CounterMode_e;
555
556
559 typedef enum
560 {
561 PWM_DeadBandInputMode_EPWMxA_Rising_and_Falling=(0 << 4),
562 PWM_DeadBandInputMode_EPWMxA_Falling_EPWMxB_Rising=(1 << 4),
563 PWM_DeadBandInputMode_EPWMxA_Rising_EPWMxB_Falling=(2 << 4),
564 PWM_DeadBandInputMode_EPWMxB_Rising_and_Falling=(3 << 4)
565 } PWM_DeadBandInputMode_e;
566
567
570 typedef enum
571 {
572 PWM_DeadBandOutputMode_Bypass=(0 << 0),
573 PWM_DeadBandOutputMode_EPWMxA_Disable_EPWMxB_Falling=(1 << 0),
574 PWM_DeadBandOutputMode_EPWMxA_Rising_EPWMxB_Disable=(2 << 0),
575 PWM_DeadBandOutputMode_EPWMxA_Rising_EPWMxB_Falling=(3 << 0)
576 } PWM_DeadBandOutputMode_e;
577
578
581 typedef enum
582 {
583 PWM_DeadBandPolarity_EPWMxA_EPWMxB=(0 << 2),
584 PWM_DeadBandPolarity_EPWMxA_Inverted=(1 << 2),
585 PWM_DeadBandPolarity_EPWMxB_Inverted=(2 << 2),
586 PWM_DeadBandPolarity_EPWMxA_Inverted_EPWMxB_Inverted=(3 << 2)
587 } PWM_DeadBandPolarity_e;
588
589
592 typedef enum
593 {
594 PWM_DigitalCompare_A_High = 0,
595 PWM_DigitalCompare_A_Low = 4,
596 PWM_DigitalCompare_B_High = 8,
597 PWM_DigitalCompare_B_Low = 12
598 } PWM_DigitalCompare_Input_e;
599
600
603 typedef enum
604 {
605 PWM_DigitalCompare_InputSel_TZ1=(0 << 0),
606 PWM_DigitalCompare_InputSel_TZ2=(1 << 0),
607 PWM_DigitalCompare_InputSel_TZ3=(2 << 0),
608 PWM_DigitalCompare_InputSel_COMP1OUT=(8 << 0),
609 PWM_DigitalCompare_InputSel_COMP2OUT=(9 << 0),
610 PWM_DigitalCompare_InputSel_COMP3OUT=(10 << 0)
611 } PWM_DigitalCompare_InputSel_e;
612
613
616 typedef enum
617 {
618 PWM_DigitalCompare_FilterSrc_DCAEVT1=0,
619 PWM_DigitalCompare_FilterSrc_DCAEVT2,
620 PWM_DigitalCompare_FilterSrc_DCBEVT1,
621 PWM_DigitalCompare_FilterSrc_DCBEVT2
622 } PWM_DigitalCompare_FilterSrc_e;
623
624
627 typedef enum
628 {
629 PWM_DigitalCompare_PulseSel_CTRPRD=0,
630 PWM_DigitalCompare_PulseSel_CTR0
631 } PWM_DigitalCompare_PulseSel_e;
632
633
636 typedef enum
637 {
638 PWM_HspClkDiv_by_1=(0 << 7),
639 PWM_HspClkDiv_by_2=(1 << 7),
640 PWM_HspClkDiv_by_4=(2 << 7),
641 PWM_HspClkDiv_by_6=(3 << 7),
642 PWM_HspClkDiv_by_8=(4 << 7),
643 PWM_HspClkDiv_by_10=(5 << 7),
644 PWM_HspClkDiv_by_12=(6 << 7),
645 PWM_HspClkDiv_by_14=(7 << 7)
646 } PWM_HspClkDiv_e;
647
650 typedef enum
651 {
652 PWM_HrControlMode_Duty = (0 << 2),
653 PWM_HrControlMode_Phase = (1 << 2)
654 } PWM_HrControlMode_e;
655
656
659 typedef enum
660 {
661 PWM_HrEdgeMode_Disabled = (0 << 0),
662 PWM_HrEdgeMode_Rising = (1 << 0),
663 PWM_HrEdgeMode_Falling = (2 << 0),
664 PWM_HrEdgeMode_Both = (3 << 0)
665 } PWM_HrEdgeMode_e;
666
667
670 typedef enum
671 {
672 PWM_HrShadowMode_CTR_EQ_0 = (0 << 3),
673 PWM_HrShadowMode_CTR_EQ_PRD = (1 << 3),
674 PWM_HrShadowMode_CTR_EQ_0_OR_PRD = (2 << 3)
675 } PWM_HrShadowMode_e;
676
679 typedef enum
680 {
681 PWM_IntMode_CounterEqualZero=(1 << 0),
682 PWM_IntMode_CounterEqualPeriod=(2 << 0),
683 PWM_IntMode_CounterEqualZeroOrPeriod=(3 << 0),
684 PWM_IntMode_CounterEqualCmpAIncr=(4 << 0),
685 PWM_IntMode_CounterEqualCmpADecr=(5 << 0),
686 PWM_IntMode_CounterEqualCmpBIncr=(6 << 0),
687 PWM_IntMode_CounterEqualCmpBDecr=(7 << 0)
688 } PWM_IntMode_e;
689
690
693 typedef enum
694 {
695 PWM_IntPeriod_Disable=(0 << 0),
696 PWM_IntPeriod_FirstEvent=(1 << 0),
697 PWM_IntPeriod_SecondEvent=(2 << 0),
698 PWM_IntPeriod_ThirdEvent=(3 << 0)
699 } PWM_IntPeriod_e;
700
701
704 typedef enum
705 {
706 PWM_LoadMode_Zero=0,
707 PWM_LoadMode_Period,
708 PWM_LoadMode_Either,
709 PWM_LoadMode_Freeze
710 } PWM_LoadMode_e;
711
712
715 typedef enum
716 {
717 PWM_Number_1=0,
718 PWM_Number_2,
719 PWM_Number_3,
720 PWM_Number_4,
721 PWM_Number_5,
722 PWM_Number_6,
723 PWM_Number_7,
724 PWM_Number_8
725 } PWM_Number_e;
726
727
730 typedef enum
731 {
732 PWM_PeriodLoad_Shadow=(0 << 3),
733 PWM_PeriodLoad_Immediate=(1 << 3)
734 } PWM_PeriodLoad_e;
735
736
739 typedef enum
740 {
741 PWM_PhaseDir_CountDown=(0 << 13),
742 PWM_PhaseDir_CountUp=(1 << 13)
743 } PWM_PhaseDir_e;
744
745
748 typedef enum
749 {
750 PWM_RunMode_SoftStopAfterIncr=(0 << 14),
751 PWM_RunMode_SoftStopAfterDecr=(0 << 14),
752 PWM_RunMode_SoftStopAfterCycle=(1 << 14),
753 PWM_RunMode_FreeRun=(2 << 14)
754 } PWM_RunMode_e;
755
756
759 typedef enum
760 {
761 PWM_ShadowMode_Shadow=0,
762 PWM_ShadowMode_Immediate
763 } PWM_ShadowMode_e;
764
765
768 typedef enum
769 {
770 PWM_ShadowStatus_NotFull=0,
771 PWM_ShadowStatus_Full
772 } PWM_ShadowStatus_e;
773
774
777 typedef enum
778 {
779 PWM_SocPeriod_Disable=0,
780 PWM_SocPeriod_FirstEvent,
781 PWM_SocPeriod_SecondEvent,
782 PWM_SocPeriod_ThirdEvent
783 } PWM_SocPeriod_e;
784
785
788 typedef enum
789 {
790 PWM_SocPulseSrc_DcEvt=0,
791 PWM_SocPulseSrc_CounterEqualZero,
792 PWM_SocPulseSrc_CounterEqualPeriod,
793 PWM_SocPulseSrc_CounterEqualZeroOrPeriod,
794 PWM_SocPulseSrc_CounterEqualCmpAIncr,
795 PWM_SocPulseSrc_CounterEqualCmpADecr,
796 PWM_SocPulseSrc_CounterEqualCmpBIncr,
797 PWM_SocPulseSrc_CounterEqualCmpBDecr
798 } PWM_SocPulseSrc_e;
799
800
803 typedef enum
804 {
805 PWM_SyncMode_EPWMxSYNC=(0 << 4),
806 PWM_SyncMode_CounterEqualZero=(1 << 4),
807 PWM_SyncMode_CounterEqualCounterCompareZero=(2 << 4),
808 PWM_SyncMode_Disable=(3 << 4)
809 } PWM_SyncMode_e;
810
811
814 typedef enum
815 {
816 PWM_TripZoneSrc_CycleByCycle_TZ1_NOT=(1 << 0),
817 PWM_TripZoneSrc_CycleByCycle_TZ2_NOT=(1 << 1),
818 PWM_TripZoneSrc_CycleByCycle_TZ3_NOT=(1 << 2),
819 PWM_TripZoneSrc_CycleByCycle_TZ4_NOT=(1 << 3),
820 PWM_TripZoneSrc_CycleByCycle_TZ5_NOT=(1 << 4),
821 PWM_TripZoneSrc_CycleByCycle_TZ6_NOT=(1 << 5),
822 PWM_TripZoneSrc_CycleByCycle_CmpA=(1 << 6),
823 PWM_TripZoneSrc_CycleByCycle_CmpB=(1 << 7),
824 PWM_TripZoneSrc_OneShot_TZ1_NOT=(1 << 8),
825 PWM_TripZoneSrc_OneShot_TZ2_NOT=(1 << 9),
826 PWM_TripZoneSrc_OneShot_TZ3_NOT=(1 << 10),
827 PWM_TripZoneSrc_OneShot_TZ4_NOT=(1 << 11),
828 PWM_TripZoneSrc_OneShot_TZ5_NOT=(1 << 12),
829 PWM_TripZoneSrc_OneShot_TZ6_NOT=(1 << 13),
830 PWM_TripZoneSrc_OneShot_CmpA=(1 << 14),
831 PWM_TripZoneSrc_OneShot_CmpB=(1 << 15)
832 } PWM_TripZoneSrc_e;
833
834
837 typedef enum
838 {
839 PWM_TripZoneState_HighImp=0,
840 PWM_TripZoneState_EPWM_High,
841 PWM_TripZoneState_EPWM_Low,
842 PWM_TripZoneState_DoNothing
843 } PWM_TripZoneState_e;
844
847 typedef enum
848 {
849 PWM_TripZoneFlag_Global = (1 << 0),
850 PWM_TripZoneFlag_CBC = (1 << 1),
851 PWM_TripZoneFlag_OST = (1 << 2),
852 PWM_TripZoneFlag_DCAEVT1 = (1 << 3),
853 PWM_TripZoneFlag_DCAEVT2 = (1 << 4),
854 PWM_TripZoneFlag_DCBEVT1 = (1 << 5),
855 PWM_TripZoneFlag_DCBEVT2 = (1 << 6)
856 } PWM_TripZoneFlag_e;
857
860 typedef enum
861 {
862 PWM_TripZoneDCEventSel_Disabled = (0 << 0),
863 PWM_TripZoneDCEventSel_DCxHL_DCxLX = (1 << 0),
864 PWM_TripZoneDCEventSel_DCxHH_DCxLX = (2 << 0),
865 PWM_TripZoneDCEventSel_DCxHx_DCxLL = (3 << 0),
866 PWM_TripZoneDCEventSel_DCxHx_DCxLH = (4 << 0),
867 PWM_TripZoneDCEventSel_DCxHL_DCxLH = (5 << 0)
868 } PWM_TripZoneDCEventSel_e;
869
870
873 typedef struct _PWM_Obj_
874 {
875 volatile uint16_t TBCTL;
876 volatile uint16_t TBSTS;
877 volatile uint16_t TBPHSHR;
878 volatile uint16_t TBPHS;
879 volatile uint16_t TBCTR;
880 volatile uint16_t TBPRD;
881 volatile uint16_t TBPRDHR;
882 volatile uint16_t CMPCTL;
883 volatile uint16_t CMPAHR;
884 volatile uint16_t CMPA;
885 volatile uint16_t CMPB;
886 volatile uint16_t AQCTLA;
887 volatile uint16_t AQCTLB;
888 volatile uint16_t AQSFRC;
889 volatile uint16_t AQCSFRC;
890 volatile uint16_t DBCTL;
891 volatile uint16_t DBRED;
892 volatile uint16_t DBFED;
893 volatile uint16_t TZSEL;
894 volatile uint16_t TZDCSEL;
895 volatile uint16_t TZCTL;
896 volatile uint16_t TZEINT;
897 volatile uint16_t TZFLG;
898 volatile uint16_t TZCLR;
899 volatile uint16_t TZFRC;
900 volatile uint16_t ETSEL;
901 volatile uint16_t ETPS;
902 volatile uint16_t ETFLG;
903 volatile uint16_t ETCLR;
904 volatile uint16_t ETFRC;
905 volatile uint16_t PCCTL;
906 volatile uint16_t rsvd_1;
907 volatile uint16_t HRCNFG;
908 volatile uint16_t HRPWR;
909 volatile uint16_t rsvd_2[4];
910 volatile uint16_t HRMSTEP;
911 volatile uint16_t rsvd_3;
912 volatile uint16_t HRPCTL;
913 volatile uint16_t rsvd_4;
914 volatile uint16_t TBPRDHRM;
915 volatile uint16_t TBPRDM;
916 volatile uint16_t CMPAHRM;
917 volatile uint16_t CMPAM;
918 volatile uint16_t rsvd_5[2];
919 volatile uint16_t DCTRIPSEL;
920 volatile uint16_t DCACTL;
921 volatile uint16_t DCBCTL;
922 volatile uint16_t DCFCTL;
923 volatile uint16_t DCCAPCTL;
924 volatile uint16_t DCFOFFSET;
925 volatile uint16_t DCFOFFSETCNT;
926 volatile uint16_t DCFWINDOW;
927 volatile uint16_t DCFWINDOWCNT;
928 volatile uint16_t DCCAP;
929
930 } PWM_Obj;
931
932
935 typedef struct _PWM_Obj_ *PWM_Handle;
936
937
938 // **************************************************************************
939 // the globals
940
941
942 // **************************************************************************
943 // the function prototypes
944
947 static inline void PWM_clearIntFlag(PWM_Handle pwmHandle)
948 {
949 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
950
951
952 // set the bits
953 pwm->ETCLR = PWM_ETCLR_INT_BITS;
954
955 return;
956 } // end of PWM_clearIntFlag() function
957
958
961 static inline void PWM_clearOneShotTrip(PWM_Handle pwmHandle)
962 {
963 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
964
965
966 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
967
968 // set the bits
969 pwm->TZCLR = PWM_TZCLR_OST_BITS;
970
971 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
972
973 return;
974 } // end of PWM_clearOneShotTrip() function
975
976
979 static inline void PWM_clearSocAFlag(PWM_Handle pwmHandle)
980 {
981 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
982
983
984 // set the bits
985 pwm->ETCLR = PWM_ETCLR_SOCA_BITS;
986
987 return;
988 } // end of PWM_clearSocAFlag() function
989
990
993 static inline void PWM_clearSocBFlag(PWM_Handle pwmHandle)
994 {
995 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
996
997
998 // set the bits
999 pwm->ETCLR = PWM_ETCLR_SOCB_BITS;
1000
1001 return;
1002 } // end of PWM_clearSocBFlag() function
1003
1007 extern void PWM_clearTripZone(PWM_Handle pwmHandle, const PWM_TripZoneFlag_e tripZoneFlag);
1008
1009
1012 extern void PWM_decrementDeadBandFallingEdgeDelay(PWM_Handle pwmHandle);
1013
1014
1017 extern void PWM_decrementDeadBandRisingEdgeDelay(PWM_Handle pwmHandle);
1018
1021 extern void PWM_disableAutoConvert(PWM_Handle pwmHandle);
1022
1025 extern void PWM_disableChopping(PWM_Handle pwmHandle);
1026
1027
1030 extern void PWM_disableCounterLoad(PWM_Handle pwmHandle);
1031
1032
1035 extern void PWM_disableDeadBand(PWM_Handle pwmHandle);
1036
1037
1040 extern void PWM_disableDeadBandHalfCycle(PWM_Handle pwmHandle);
1041
1042
1045 extern void PWM_disableDigitalCompareBlankingWindow(PWM_Handle pwmHandle);
1046
1047
1050 extern void PWM_disableDigitalCompareBlankingWindowInversion(PWM_Handle pwmHandle);
1051
1054 extern void PWM_disableHrPeriod(PWM_Handle pwmHandle);
1055
1056
1059 extern void PWM_disableHrPhaseSync(PWM_Handle pwmHandle);
1060
1063 extern void PWM_disableInt(PWM_Handle pwmHandle);
1064
1065
1068 extern void PWM_disableSocAPulse(PWM_Handle pwmHandle);
1069
1070
1073 extern void PWM_disableSocBPulse(PWM_Handle pwmHandle);
1074
1075
1078 extern void PWM_disableTripZones(PWM_Handle pwmHandle);
1079
1080
1084 extern void PWM_disableTripZoneInt(PWM_Handle pwmHandle, const PWM_TripZoneFlag_e interruptSource);
1085
1086
1090 extern void PWM_disableTripZoneSrc(PWM_Handle pwmHandle,const PWM_TripZoneSrc_e src);
1091
1094 extern void PWM_enableAutoConvert(PWM_Handle pwmHandle);
1095
1098 extern void PWM_enableChopping(PWM_Handle pwmHandle);
1099
1100
1103 extern void PWM_enableCounterLoad(PWM_Handle pwmHandle);
1104
1105
1108 extern void PWM_enableDeadBandHalfCycle(PWM_Handle pwmHandle);
1109
1110
1113 extern void PWM_enableDigitalCompareBlankingWindow(PWM_Handle pwmHandle);
1114
1115
1118 extern void PWM_enableDigitalCompareBlankingWindowInversion(PWM_Handle pwmHandle);
1119
1122 extern void PWM_enableHrPeriod(PWM_Handle pwmHandle);
1123
1124
1127 extern void PWM_enableHrPhaseSync(PWM_Handle pwmHandle);
1128
1131 extern void PWM_enableInt(PWM_Handle pwmHandle);
1132
1133
1136 extern void PWM_enableSocAPulse(PWM_Handle pwmHandle);
1137
1138
1141 extern void PWM_enableSocBPulse(PWM_Handle pwmHandle);
1142
1143
1147 extern void PWM_enableTripZoneInt(PWM_Handle pwmHandle, const PWM_TripZoneFlag_e interruptSource);
1148
1149
1153 extern void PWM_enableTripZoneSrc(PWM_Handle pwmHandle,const PWM_TripZoneSrc_e src);
1154
1155
1159 static inline uint16_t PWM_get_CmpA(PWM_Handle pwmHandle)
1160 {
1161 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1162
1163 return pwm->CMPA;
1164 } // end of PWM_get_CmpA() function
1165
1166
1170 static inline uint16_t PWM_get_CmpAM(PWM_Handle pwmHandle)
1171 {
1172 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1173
1174 return pwm->CMPAM;
1175 } // end of PWM_get_CmpAM() function
1176
1177
1181 static inline uint16_t PWM_get_CmpB(PWM_Handle pwmHandle)
1182 {
1183 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1184
1185 return pwm->CMPB;
1186 } // end of PWM_get_CmpB() function
1187
1188
1191 static inline void PWM_forceSync(PWM_Handle pwmHandle)
1192 {
1193 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1194
1195 pwm->TBCTL |= PWM_TBCTL_SWFSYNC_BITS;
1196
1197 return;
1198 } // end of PWM_forceSync() function
1199
1200
1204 extern uint16_t PWM_getDeadBandFallingEdgeDelay(PWM_Handle pwmHandle);
1205
1206
1210 extern uint16_t PWM_getDeadBandRisingEdgeDelay(PWM_Handle pwmHandle);
1211
1212
1216 extern uint16_t PWM_getIntCount(PWM_Handle pwmHandle);
1217
1218
1222 static inline uint16_t PWM_getPeriod(PWM_Handle pwmHandle)
1223 {
1224 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1225
1226 return (pwm->TBPRD);
1227 } // end of PWM_getPeriod() function
1228
1229
1233 static inline uint16_t PWM_getCmpA(PWM_Handle pwmHandle)
1234 {
1235 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1236
1237 return (pwm->CMPA);
1238 } // end of PWM_getCmpA() function
1239
1243 static inline uint16_t PWM_getCmpAHr(PWM_Handle pwmHandle)
1244 {
1245 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1246
1247 return (pwm->CMPAHR);
1248 } // end of PWM_getCmpAHr() function
1249
1253 static inline uint16_t PWM_getCmpB(PWM_Handle pwmHandle)
1254 {
1255 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1256
1257 return (pwm->CMPB);
1258 } // end of PWM_getCmpB() function
1259
1260
1264 extern uint16_t PWM_getSocACount(PWM_Handle pwmHandle);
1265
1266
1270 extern uint16_t PWM_getSocBCount(PWM_Handle pwmHandle);
1271
1275 extern void PWM_setHrControlMode(PWM_Handle pwmHandle, const PWM_HrControlMode_e controlMode);
1276
1277
1281 extern void PWM_setHrEdgeMode(PWM_Handle pwmHandle, const PWM_HrEdgeMode_e edgeMode);
1282
1283
1287 extern void PWM_setHrShadowMode(PWM_Handle pwmHandle, const PWM_HrShadowMode_e shadowMode);
1288
1291 extern void PWM_incrementDeadBandFallingEdgeDelay(PWM_Handle pwmHandle);
1292
1293
1296 extern void PWM_incrementDeadBandRisingEdgeDelay(PWM_Handle pwmHandle);
1297
1298
1303 extern PWM_Handle PWM_init(void *pMemory,const size_t numBytes);
1304
1305
1309 extern void PWM_setActionQual_CntDown_CmpA_PwmA(PWM_Handle pwmHandle,const PWM_ActionQual_e actionQual);
1310
1311
1315 extern void PWM_setActionQual_CntDown_CmpA_PwmB(PWM_Handle pwmHandle,const PWM_ActionQual_e actionQual);
1316
1317
1321 extern void PWM_setActionQual_CntDown_CmpB_PwmA(PWM_Handle pwmHandle,const PWM_ActionQual_e actionQual);
1322
1323
1327 extern void PWM_setActionQual_CntDown_CmpB_PwmB(PWM_Handle pwmHandle,const PWM_ActionQual_e actionQual);
1328
1329
1333 extern void PWM_setActionQual_CntUp_CmpA_PwmA(PWM_Handle pwmHandle,const PWM_ActionQual_e actionQual);
1334
1335
1339 extern void PWM_setActionQual_CntUp_CmpA_PwmB(PWM_Handle pwmHandle,const PWM_ActionQual_e actionQual);
1340
1341
1345 extern void PWM_setActionQual_CntUp_CmpB_PwmA(PWM_Handle pwmHandle,const PWM_ActionQual_e actionQual);
1346
1347
1351 extern void PWM_setActionQual_CntUp_CmpB_PwmB(PWM_Handle pwmHandle,const PWM_ActionQual_e actionQual);
1352
1353
1357 extern void PWM_setActionQualContSWForce_PwmA(PWM_Handle pwmHandle,
1358 const PWM_ActionQualContSWForce_e actionQualContSWForce);
1359
1360
1364 extern void PWM_setActionQualContSWForce_PwmB(PWM_Handle pwmHandle,
1365 const PWM_ActionQualContSWForce_e actionQualContSWForce);
1366
1367
1371 extern void PWM_setActionQual_Period_PwmA(PWM_Handle pwmHandle,const PWM_ActionQual_e actionQual);
1372
1373
1377 extern void PWM_setActionQual_Period_PwmB(PWM_Handle pwmHandle,const PWM_ActionQual_e actionQual);
1378
1379
1383 extern void PWM_setActionQual_Zero_PwmA(PWM_Handle pwmHandle,const PWM_ActionQual_e actionQual);
1384
1385
1389 extern void PWM_setActionQual_Zero_PwmB(PWM_Handle pwmHandle,const PWM_ActionQual_e actionQual);
1390
1391
1395 extern void PWM_setChoppingClkFreq(PWM_Handle pwmHandle,const PWM_ChoppingClkFreq_e clkFreq);
1396
1397
1401 extern void PWM_setChoppingDutyCycle(PWM_Handle pwmHandle,const PWM_ChoppingDutyCycle_e dutyCycle);
1402
1403
1407 extern void PWM_setChoppingPulseWidth(PWM_Handle pwmHandle,const PWM_ChoppingPulseWidth_e pulseWidth);
1408
1409
1413 extern void PWM_setClkDiv(PWM_Handle pwmHandle,const PWM_ClkDiv_e clkDiv);
1414
1415
1419 extern void PWM_setCount(PWM_Handle pwmHandle,const uint16_t count);
1420
1421
1425 extern void PWM_setCounterMode(PWM_Handle pwmHandle,const PWM_CounterMode_e counterMode);
1426
1427
1431 extern void PWM_setDeadBandFallingEdgeDelay(PWM_Handle pwmHandle,const uint16_t delay);
1432
1433
1437 extern void PWM_setDeadBandInputMode(PWM_Handle pwmHandle,const PWM_DeadBandInputMode_e inputMode);
1438
1439
1443 extern void PWM_setDeadBandOutputMode(PWM_Handle pwmHandle,const PWM_DeadBandOutputMode_e outputMode);
1444
1445
1449 extern void PWM_setDeadBandPolarity(PWM_Handle pwmHandle,const PWM_DeadBandPolarity_e polarity);
1450
1451
1455 extern void PWM_setDeadBandRisingEdgeDelay(PWM_Handle pwmHandle,const uint16_t delay);
1456
1457
1461 extern void PWM_setDigitalCompareFilterSource(PWM_Handle pwmHandle,
1462 const PWM_DigitalCompare_FilterSrc_e input);
1463
1464
1468 extern void PWM_setDigitalCompareBlankingPulse(PWM_Handle pwmHandle,
1469 const PWM_DigitalCompare_PulseSel_e pulseSelect);
1470
1471
1475 extern void PWM_setDigitalCompareFilterOffset(PWM_Handle pwmHandle,
1476 const uint16_t offset);
1477
1478
1482 extern void PWM_setDigitalCompareFilterWindow(PWM_Handle pwmHandle,
1483 const uint16_t window);
1484
1485
1490 extern void PWM_setDigitalCompareInput(PWM_Handle pwmHandle,
1491 const PWM_DigitalCompare_Input_e input,
1492 const PWM_DigitalCompare_InputSel_e inputSel);
1493
1494
1501 extern void PWM_setDigitalCompareAEvent1(PWM_Handle pwmHandle,
1502 const bool selectFilter,
1503 const bool disableSync,
1504 const bool enableSoc,
1505 const bool generateSync);
1506
1507
1512 extern void PWM_setDigitalCompareAEvent2(PWM_Handle pwmHandle,
1513 const bool selectFilter,
1514 const bool disableSync);
1515
1516
1523 extern void PWM_setDigitalCompareBEvent1(PWM_Handle pwmHandle,
1524 const bool selectFilter,
1525 const bool disableSync,
1526 const bool enableSoc,
1527 const bool generateSync);
1528
1529
1534 extern void PWM_setDigitalCompareBEvent2(PWM_Handle pwmHandle,
1535 const bool selectFilter,
1536 const bool disableSync);
1537
1538
1542 extern void PWM_setHighSpeedClkDiv(PWM_Handle pwmHandle,const PWM_HspClkDiv_e clkDiv);
1543
1544
1548 extern void PWM_setIntMode(PWM_Handle pwmHandle,const PWM_IntMode_e intMode);
1549
1550
1554 extern void PWM_setIntPeriod(PWM_Handle pwmHandle,const PWM_IntPeriod_e intPeriod);
1555
1556
1560 extern void PWM_setLoadMode_CmpA(PWM_Handle pwmHandle,const PWM_LoadMode_e loadMode);
1561
1562
1566 extern void PWM_setLoadMode_CmpB(PWM_Handle pwmHandle,const PWM_LoadMode_e loadMode);
1567
1568
1572 extern void PWM_setPeriodLoad(PWM_Handle pwmHandle,const PWM_PeriodLoad_e periodLoad);
1573
1574
1577 static inline void PWM_setOneShotTrip(PWM_Handle pwmHandle)
1578 {
1579 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1580
1581
1582 ENABLE_PROTECTED_REGISTER_WRITE_MODE;
1583
1584 // set the bits
1585 pwm->TZFRC |= PWM_TZFRC_OST_BITS;
1586
1587 DISABLE_PROTECTED_REGISTER_WRITE_MODE;
1588
1589 return;
1590 } // end of PWM_setOneShotTrip() function
1591
1592
1596 extern void PWM_setPeriod(PWM_Handle pwmHandle,const uint16_t period);
1597
1601 extern void PWM_setPeriodHr(PWM_Handle pwmHandle,const uint16_t period);
1602
1606 extern void PWM_setPhase(PWM_Handle pwmHandle,const uint16_t phase);
1607
1608
1612 extern void PWM_setPhaseDir(PWM_Handle pwmHandle,const PWM_PhaseDir_e phaseDir);
1613
1614
1618 extern void PWM_setRunMode(PWM_Handle pwmHandle,const PWM_RunMode_e runMode);
1619
1620
1624 extern void PWM_setSocAPeriod(PWM_Handle pwmHandle,const PWM_SocPeriod_e intPeriod);
1625
1626
1630 extern void PWM_setSocAPulseSrc(PWM_Handle pwmHandle,const PWM_SocPulseSrc_e pulseSrc);
1631
1632
1636 extern void PWM_setSocBPeriod(PWM_Handle pwmHandle,const PWM_SocPeriod_e intPeriod);
1637
1638
1642 extern void PWM_setSocBPulseSrc(PWM_Handle pwmHandle,const PWM_SocPulseSrc_e pulseSrc);
1643
1644
1648 extern void PWM_setShadowMode_CmpA(PWM_Handle pwmHandle,const PWM_ShadowMode_e shadowMode);
1649
1650
1654 extern void PWM_setShadowMode_CmpB(PWM_Handle pwmHandle,const PWM_ShadowMode_e shadowMode);
1655
1656
1659 extern void PWM_setSwSync(PWM_Handle pwmHandle);
1660
1661
1665 extern void PWM_setSyncMode(PWM_Handle pwmHandle,const PWM_SyncMode_e syncMode);
1666
1667
1671 extern void PWM_setTripZoneDCEventSelect_DCAEVT1(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent);
1672
1673
1677 extern void PWM_setTripZoneDCEventSelect_DCAEVT2(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent);
1678
1679
1683 extern void PWM_setTripZoneDCEventSelect_DCBEVT1(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent);
1684
1685
1689 extern void PWM_setTripZoneDCEventSelect_DCBEVT2(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent);
1690
1691
1695 extern void PWM_setTripZoneState_DCAEVT1(PWM_Handle pwmHandle,const PWM_TripZoneState_e tripZoneState);
1696
1697
1701 extern void PWM_setTripZoneState_DCAEVT2(PWM_Handle pwmHandle,const PWM_TripZoneState_e tripZoneState);
1702
1703
1707 extern void PWM_setTripZoneState_DCBEVT1(PWM_Handle pwmHandle,const PWM_TripZoneState_e tripZoneState);
1708
1709
1713 extern void PWM_setTripZoneState_DCBEVT2(PWM_Handle pwmHandle,const PWM_TripZoneState_e tripZoneState);
1714
1715
1719 extern void PWM_setTripZoneState_TZA(PWM_Handle pwmHandle,const PWM_TripZoneState_e tripZoneState);
1720
1721
1725 extern void PWM_setTripZoneState_TZB(PWM_Handle pwmHandle,const PWM_TripZoneState_e tripZoneState);
1726
1727
1731 static inline void PWM_write_CmpA(PWM_Handle pwmHandle,const uint16_t pwmData)
1732 {
1733 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1734
1735 pwm->CMPA = pwmData;
1736
1737 return;
1738 } // end of PWM_write_CmpA() function
1739
1740
1744 static inline void PWM_setCmpA(PWM_Handle pwmHandle,const uint16_t pwmData)
1745 {
1746 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1747
1748 pwm->CMPA = pwmData;
1749
1750 return;
1751 } // end of PWM_setCmpA() function
1752
1756 static inline void PWM_setCmpAHr(PWM_Handle pwmHandle,const uint16_t pwmData)
1757 {
1758 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1759
1760 pwm->CMPAHR = pwmData;
1761
1762 return;
1763 } // end of PWM_setCmpAHr() function
1764
1768 static inline void PWM_write_CmpB(PWM_Handle pwmHandle,const uint16_t pwmData)
1769 {
1770 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1771
1772 pwm->CMPB = pwmData;
1773
1774 return;
1775 } // end of PWM_write_CmpB() function
1776
1777
1781 static inline void PWM_setCmpB(PWM_Handle pwmHandle,const uint16_t pwmData)
1782 {
1783 PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
1784
1785 pwm->CMPB = pwmData;
1786
1787 return;
1788 } // end of PWM_setCmpB() function
1789
1790
1791 #ifdef __cplusplus
1792 }
1793 #endif // extern "C"
1794
1796 #endif // end of _PWM_H_ definition
1797
PWM_HspClkDiv_by_10
Definition: pwm.h:643
_PWM_Obj_::TBCTL
volatile uint16_t TBCTL
Time-Base Control Register.
Definition: pwm.h:875
PWM_ChoppingPulseWidth_One_Eighth_SysClkOut
Definition: pwm.h:527
PWM_IntMode_CounterEqualCmpADecr
Definition: pwm.h:685
PWM_ClkDiv_e
PWM_ClkDiv_e
Enumeration to define the pulse width modulation (PWM) clock dividers.
Definition: pwm.h:481
PWM_ClkDiv_by_8
Definition: pwm.h:486
PWM_ChoppingDutyCycle_Four_Eighths
Definition: pwm.h:516
PWM_getDeadBandFallingEdgeDelay
uint16_t PWM_getDeadBandFallingEdgeDelay(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) deadband falling edge delay.
Definition: pwm.c:476
PWM_ActionQual_e
PWM_ActionQual_e
Enumeration to define the pulse width modulation (PWM) action qualifiers.
Definition: pwm.h:460
PWM_IntMode_CounterEqualCmpBDecr
Definition: pwm.h:687
PWM_Number_1
Definition: pwm.h:717
PWM_ClkDiv_by_4
Definition: pwm.h:485
PWM_TripZoneSrc_OneShot_TZ4_NOT
Definition: pwm.h:827
PWM_SocPulseSrc_CounterEqualCmpBDecr
Definition: pwm.h:797
_PWM_Obj_::DCCAPCTL
volatile uint16_t DCCAPCTL
Digital Compare Capture Control.
Definition: pwm.h:923
PWM_getDeadBandRisingEdgeDelay
uint16_t PWM_getDeadBandRisingEdgeDelay(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) deadband rising edge delay.
Definition: pwm.c:484
_PWM_Obj_::ETFLG
volatile uint16_t ETFLG
Event trigger flags.
Definition: pwm.h:902
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_ChoppingPulseWidth_Five_Eighths_SysClkOut
Definition: pwm.h:531
PWM_IntPeriod_SecondEvent
Definition: pwm.h:697
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_Number_3
Definition: pwm.h:719
PWM_getCmpA
static uint16_t PWM_getCmpA(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) data value from the Counter Compare A hardware.
Definition: pwm.h:1233
_PWM_Obj_::DCFWINDOWCNT
volatile uint16_t DCFWINDOWCNT
Digital Compare Filter Window Counter.
Definition: pwm.h:927
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_Obj_::rsvd_4
volatile uint16_t rsvd_4
Reserved.
Definition: pwm.h:913
_PWM_Obj_::rsvd_1
volatile uint16_t rsvd_1
Reserved.
Definition: pwm.h:906
PWM_DigitalCompare_InputSel_COMP2OUT
Definition: pwm.h:609
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_IntPeriod_Disable
Definition: pwm.h:695
PWM_DeadBandPolarity_EPWMxA_Inverted
Definition: pwm.h:584
_PWM_Obj_::AQCTLA
volatile uint16_t AQCTLA
Action-Qualifier Control Register for Output A (EPWMxA)
Definition: pwm.h:886
PWM_Obj
struct _PWM_Obj_ PWM_Obj
Defines 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_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_Number_8
Definition: pwm.h:724
PWM_PhaseDir_CountUp
Definition: pwm.h:742
PWM_TripZoneFlag_DCAEVT2
Digital Compare A Event 2 Trip Zone flag.
Definition: pwm.h:853
PWM_decrementDeadBandRisingEdgeDelay
void PWM_decrementDeadBandRisingEdgeDelay(PWM_Handle pwmHandle)
Decrement the dead band rising edge delay.
Definition: pwm.c:82
PWM_ChoppingPulseWidth_Fifteen_Eighths_SysClkOut
Definition: pwm.h:541
PWM_write_CmpA
static void PWM_write_CmpA(PWM_Handle pwmHandle, const uint16_t pwmData)
Writes the pulse width modulation (PWM) data value to the Counter Compare A hardware.
Definition: pwm.h:1731
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_Obj_::TBPHSHR
volatile uint16_t TBPHSHR
Extension for the HRPWM Phase Register.
Definition: pwm.h:877
_PWM_Obj_::ETCLR
volatile uint16_t ETCLR
Event trigger clear.
Definition: pwm.h:903
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_getPeriod
static uint16_t PWM_getPeriod(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) period value.
Definition: pwm.h:1222
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_DeadBandInputMode_EPWMxA_Rising_and_Falling
Definition: pwm.h:561
PWM_DigitalCompare_PulseSel_CTR0
Definition: pwm.h:630
PWM_SyncMode_CounterEqualCounterCompareZero
Definition: pwm.h:807
PWM_SocPeriod_SecondEvent
Definition: pwm.h:781
PWM_ChoppingPulseWidth_Ten_Eighths_SysClkOut
Definition: pwm.h:536
PWM_TripZoneSrc_OneShot_TZ2_NOT
Definition: pwm.h:825
PWM_ShadowMode_Shadow
Definition: pwm.h:761
PWM_DigitalCompare_InputSel_COMP3OUT
Definition: pwm.h:610
PWM_TripZoneSrc_OneShot_TZ6_NOT
Definition: pwm.h:829
PWM_CounterMode_Up
Definition: pwm.h:550
PWM_ShadowStatus_NotFull
Definition: pwm.h:770
PWM_ChoppingPulseWidth_Seven_Eighths_SysClkOut
Definition: pwm.h:533
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_SocPulseSrc_CounterEqualPeriod
Definition: pwm.h:792
_PWM_Obj_::TZEINT
volatile uint16_t TZEINT
Trip zone interrupt enable.
Definition: pwm.h:896
PWM_ActionQualContSWForce_Set
Definition: pwm.h:475
PWM_SocPulseSrc_CounterEqualCmpADecr
Definition: pwm.h:795
_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_HrEdgeMode_Falling
Definition: pwm.h:663
PWM_ChoppingPulseWidth_Two_Eighths_SysClkOut
Definition: pwm.h:528
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_Number_4
Definition: pwm.h:720
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_::CMPAHRM
volatile uint16_t CMPAHRM
Extension of HRPWM Counter-Compare A mirror Register.
Definition: pwm.h:916
_PWM_Obj_::AQCTLB
volatile uint16_t AQCTLB
Action-Qualifier Control Register for Output B (EPWMxB)
Definition: pwm.h:887
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_ChoppingDutyCycle_One_Eighth
Definition: pwm.h:513
PWM_ShadowMode_e
PWM_ShadowMode_e
Enumeration to define the pulse width modulation (PWM) shadow modes.
Definition: pwm.h:759
_PWM_Obj_::DCFOFFSETCNT
volatile uint16_t DCFOFFSETCNT
Digital Compare Filter Offset Counter.
Definition: pwm.h:925
PWM_DigitalCompare_FilterSrc_DCBEVT2
Definition: pwm.h:621
PWM_ETCLR_SOCB_BITS
#define PWM_ETCLR_SOCB_BITS
Defines the location of the SOCB bits in the ETCLR register.
Definition: pwm.h:183
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_DeadBandOutputMode_EPWMxA_Rising_EPWMxB_Disable
Definition: pwm.h:574
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_IntPeriod_FirstEvent
Definition: pwm.h:696
_PWM_Obj_::AQSFRC
volatile uint16_t AQSFRC
Action qual SW force.
Definition: pwm.h:888
PWM_CounterMode_UpDown
Definition: pwm.h:552
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_ClkDiv_by_1
Definition: pwm.h:483
_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_ChoppingPulseWidth_Twelve_Eighths_SysClkOut
Definition: pwm.h:538
PWM_HspClkDiv_by_4
Definition: pwm.h:640
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_ActionQual_Set
Definition: pwm.h:464
PWM_SocPeriod_Disable
Definition: pwm.h:779
PWM_HspClkDiv_by_6
Definition: pwm.h:641
PWM_HrShadowMode_CTR_EQ_0
Definition: pwm.h:672
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_HrEdgeMode_Rising
Definition: pwm.h:662
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_ChoppingDutyCycle_Six_Eighths
Definition: pwm.h:518
PWM_disableDigitalCompareBlankingWindowInversion
void PWM_disableDigitalCompareBlankingWindowInversion(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) digital compare blanking window inversion.
Definition: pwm.c:170
PWM_TripZoneDCEventSel_DCxHx_DCxLH
Compare H = Don't Care, Compare L = High.
Definition: pwm.h:866
PWM_TripZoneSrc_CycleByCycle_TZ6_NOT
Definition: pwm.h:821
PWM_IntMode_CounterEqualZeroOrPeriod
Definition: pwm.h:683
PWM_RunMode_SoftStopAfterIncr
Definition: pwm.h:750
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_LoadMode_Zero
Definition: pwm.h:706
PWM_TripZoneFlag_e
PWM_TripZoneFlag_e
Enumeration to define the pulse width modulation (PWM) trip zone states.
Definition: pwm.h:847
PWM_SocPulseSrc_CounterEqualCmpAIncr
Definition: pwm.h:794
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_clearSocAFlag
static void PWM_clearSocAFlag(PWM_Handle pwmHandle)
Clears the pulse width modulation (PWM) start of conversion (SOC) A flag.
Definition: pwm.h:979
PWM_DigitalCompare_B_Low
Definition: pwm.h:597
PWM_DigitalCompare_InputSel_TZ1
Definition: pwm.h:605
PWM_ActionQual_Toggle
Definition: pwm.h:465
_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_ActionQualContSWForce_Clear
Definition: pwm.h:474
PWM_Number_5
Definition: pwm.h:721
PWM_HrShadowMode_CTR_EQ_0_OR_PRD
Definition: pwm.h:674
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_get_CmpB
static uint16_t PWM_get_CmpB(PWM_Handle pwmHandle)
Gets the value of the Counter Compare B hardware.
Definition: pwm.h:1181
_PWM_Obj_::rsvd_3
volatile uint16_t rsvd_3
Reserved.
Definition: pwm.h:911
PWM_LoadMode_Period
Definition: pwm.h:707
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_IntMode_CounterEqualPeriod
Definition: pwm.h:682
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_Obj_::HRPCTL
volatile uint16_t HRPCTL
High Resolution Period Control.
Definition: pwm.h:912
_PWM_Obj_::HRMSTEP
volatile uint16_t HRMSTEP
HRPWM MEP Step Register.
Definition: pwm.h:910
PWM_SocPeriod_ThirdEvent
Definition: pwm.h:782
PWM_DeadBandInputMode_EPWMxA_Rising_EPWMxB_Falling
Definition: pwm.h:563
PWM_ClkDiv_by_128
Definition: pwm.h:490
_PWM_Obj_::ETFRC
volatile uint16_t ETFRC
Event trigger force.
Definition: pwm.h:904
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_DigitalCompare_PulseSel_CTRPRD
Definition: pwm.h:629
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_TripZoneFlag_DCAEVT1
Digital Compare A Event 1 Trip Zone flag.
Definition: pwm.h:852
PWM_Number_2
Definition: pwm.h:718
PWM_TripZoneSrc_CycleByCycle_TZ2_NOT
Definition: pwm.h:817
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_Obj_::TBPRDHRM
volatile uint16_t TBPRDHRM
Time-Base Period High Resolution mirror Register.
Definition: pwm.h:914
PWM_clearOneShotTrip
static void PWM_clearOneShotTrip(PWM_Handle pwmHandle)
Clears the pulse width modulation (PWM) one shot trip.
Definition: pwm.h:961
_PWM_Obj_::rsvd_2
volatile uint16_t rsvd_2[4]
Reserved.
Definition: pwm.h:909
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_DeadBandOutputMode_EPWMxA_Disable_EPWMxB_Falling
Definition: pwm.h:573
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_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_TripZoneSrc_CycleByCycle_TZ3_NOT
Definition: pwm.h:818
PWM_TripZoneSrc_OneShot_TZ1_NOT
Definition: pwm.h:824
PWM_ClkDiv_by_2
Definition: pwm.h:484
PWM_getCmpAHr
static uint16_t PWM_getCmpAHr(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) data value from the Counter Compare A Hr hardware.
Definition: pwm.h:1243
_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_DigitalCompare_InputSel_e
PWM_DigitalCompare_InputSel_e
Enumeration to define the pulse width modulation (PWM) digital compare input choices.
Definition: pwm.h:603
PWM_DigitalCompare_B_High
Definition: pwm.h:596
_PWM_Obj_::ETPS
volatile uint16_t ETPS
Event trigger pre-scaler.
Definition: pwm.h:901
PWM_TripZoneSrc_CycleByCycle_TZ5_NOT
Definition: pwm.h:820
PWM_ActionQualContSWForce_e
PWM_ActionQualContSWForce_e
Enumeration to define the pulse width modulation (PWM) Action-qualifier Continuous Software Force...
Definition: pwm.h:471
PWM_PeriodLoad_Immediate
Definition: pwm.h:733
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_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_ChoppingClkFreq_SysClkOut_by_5
Definition: pwm.h:502
_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_DeadBandOutputMode_EPWMxA_Rising_EPWMxB_Falling
Definition: pwm.h:575
PWM_ChoppingDutyCycle_Five_Eighths
Definition: pwm.h:517
PWM_TripZoneSrc_CycleByCycle_CmpB
Definition: pwm.h:823
PWM_TripZoneDCEventSel_DCxHH_DCxLX
Compare H = High, Compare L = Don't Care.
Definition: pwm.h:864
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_SyncMode_EPWMxSYNC
Definition: pwm.h:805
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_TZFRC_OST_BITS
#define PWM_TZFRC_OST_BITS
Defines the location of the OST bits in the TZFRC register.
Definition: pwm.h:385
_PWM_Obj_::TZDCSEL
volatile uint16_t TZDCSEL
Trip zone digital comparator select.
Definition: pwm.h:894
PWM_TripZoneSrc_OneShot_CmpA
Definition: pwm.h:830
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_ChoppingClkFreq_SysClkOut_by_7
Definition: pwm.h:504
PWM_ChoppingPulseWidth_Six_Eighths_SysClkOut
Definition: pwm.h:532
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_DigitalCompare_A_Low
Definition: pwm.h:595
PWM_TripZoneDCEventSel_DCxHL_DCxLX
Compare H = Low, Compare L = Don't Care.
Definition: pwm.h:863
PWM_ChoppingDutyCycle_Two_Eighths
Definition: pwm.h:514
PWM_SocPulseSrc_CounterEqualCmpBIncr
Definition: pwm.h:796
PWM_ChoppingPulseWidth_e
PWM_ChoppingPulseWidth_e
Enumeration to define the pulse width modulation (PWM) chopping clock pulse widths.
Definition: pwm.h:525
PWM_SocPulseSrc_DcEvt
Definition: pwm.h:790
PWM_TripZoneSrc_CycleByCycle_TZ1_NOT
Definition: pwm.h:816
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_TBCTL_SWFSYNC_BITS
#define PWM_TBCTL_SWFSYNC_BITS
Defines the location of the SWFSYNC bits in the TBCTL register.
Definition: pwm.h:306
PWM_DeadBandInputMode_e
PWM_DeadBandInputMode_e
Enumeration to define the pulse width modulation (PWM) deadband options.
Definition: pwm.h:559
PWM_ActionQualContSWForce_Disabled
Definition: pwm.h:473
_PWM_Obj_::DBCTL
volatile uint16_t DBCTL
Dead-band control.
Definition: pwm.h:890
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_TripZoneState_EPWM_High
Definition: pwm.h:840
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_DigitalCompare_FilterSrc_DCBEVT1
Definition: pwm.h:620
PWM_HspClkDiv_by_12
Definition: pwm.h:644
PWM_DigitalCompare_FilterSrc_DCAEVT1
Definition: pwm.h:618
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_clearSocBFlag
static void PWM_clearSocBFlag(PWM_Handle pwmHandle)
Clears the pulse width modulation (PWM) start of conversion (SOC) B flag.
Definition: pwm.h:993
PWM_DeadBandInputMode_EPWMxB_Rising_and_Falling
Definition: pwm.h:564
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_DeadBandPolarity_EPWMxA_EPWMxB
Definition: pwm.h:583
PWM_ChoppingClkFreq_SysClkOut_by_3
Definition: pwm.h:500
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_CounterMode_Stop
Definition: pwm.h:553
PWM_getCmpB
static uint16_t PWM_getCmpB(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) data value from the Counter Compare B hardware.
Definition: pwm.h:1253
PWM_TripZoneSrc_CycleByCycle_CmpA
Definition: pwm.h:822
_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_setOneShotTrip
static void PWM_setOneShotTrip(PWM_Handle pwmHandle)
Sets the pulse width modulation (PWM) one shot trip.
Definition: pwm.h:1577
_PWM_Obj_::AQCSFRC
volatile uint16_t AQCSFRC
Action qualifier continuous SW force.
Definition: pwm.h:889
PWM_TripZoneDCEventSel_e
PWM_TripZoneDCEventSel_e
Enumeration to define the pulse width modulation (PWM) trip zone event selections.
Definition: pwm.h:860
PWM_ChoppingClkFreq_SysClkOut_by_1
Definition: pwm.h:498
PWM_IntMode_CounterEqualCmpBIncr
Definition: pwm.h:686
PWM_ChoppingClkFreq_SysClkOut_by_8
Definition: pwm.h:505
PWM_DeadBandInputMode_EPWMxA_Falling_EPWMxB_Rising
Definition: pwm.h:562
_PWM_Obj_::rsvd_5
volatile uint16_t rsvd_5[2]
Reserved.
Definition: pwm.h:918
PWM_ChoppingClkFreq_SysClkOut_by_4
Definition: pwm.h:501
cpu.h
Contains public interface to various functions related to the central processing unit (CPU) object...
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_DigitalCompare_A_High
Definition: pwm.h:594
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_HrShadowMode_CTR_EQ_PRD
Definition: pwm.h:673
_PWM_Obj_::TBPRDM
volatile uint16_t TBPRDM
Time-Base Period mirror register.
Definition: pwm.h:915
PWM_forceSync
static void PWM_forceSync(PWM_Handle pwmHandle)
Force Synchronization.
Definition: pwm.h:1191
_PWM_Obj_::CMPA
volatile uint16_t CMPA
Counter-Compare A Register.
Definition: pwm.h:884
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_Obj_::TZFRC
volatile uint16_t TZFRC
Trip zone force interrupt.
Definition: pwm.h:899
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_DigitalCompare_FilterSrc_DCAEVT2
Definition: pwm.h:619
PWM_LoadMode_Freeze
Definition: pwm.h:709
PWM_enableDigitalCompareBlankingWindowInversion
void PWM_enableDigitalCompareBlankingWindowInversion(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) digital compare blanking window inversion.
Definition: pwm.c:364
PWM_Countermode_Down
Definition: pwm.h:551
PWM_Number_6
Definition: pwm.h:722
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_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_ShadowStatus_Full
Definition: pwm.h:771
PWM_TripZoneSrc_CycleByCycle_TZ4_NOT
Definition: pwm.h:819
PWM_ChoppingPulseWidth_Three_Eighths_SysClkOut
Definition: pwm.h:529
PWM_DigitalCompare_InputSel_TZ3
Definition: pwm.h:607
PWM_ChoppingDutyCycle_Seven_Eighths
Definition: pwm.h:519
PWM_TripZoneSrc_OneShot_TZ5_NOT
Definition: pwm.h:828
_PWM_Obj_::DCFWINDOW
volatile uint16_t DCFWINDOW
Digital Compare Filter Window.
Definition: pwm.h:926
PWM_ChoppingClkFreq_SysClkOut_by_2
Definition: pwm.h:499
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_TripZoneSrc_OneShot_CmpB
Definition: pwm.h:831
PWM_ETCLR_INT_BITS
#define PWM_ETCLR_INT_BITS
Defines the location of the ETCR bits in the ETCLR register.
Definition: pwm.h:175
PWM_RunMode_FreeRun
Definition: pwm.h:753
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_ClkDiv_by_32
Definition: pwm.h:488
PWM_ChoppingPulseWidth_Eight_Eighths_SysClkOut
Definition: pwm.h:534
PWM_ChoppingPulseWidth_Fourteen_Eighths_SysClkOut
Definition: pwm.h:540
PWM_PhaseDir_CountDown
Definition: pwm.h:741
PWM_HspClkDiv_by_8
Definition: pwm.h:642
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_setCmpA
static void PWM_setCmpA(PWM_Handle pwmHandle, const uint16_t pwmData)
Writes the pulse width modulation (PWM) data value to the Counter Compare A hardware.
Definition: pwm.h:1744
PWM_TripZoneDCEventSel_DCxHx_DCxLL
Compare H = Don't Care, Compare L = Low.
Definition: pwm.h:865
PWM_get_CmpAM
static uint16_t PWM_get_CmpAM(PWM_Handle pwmHandle)
Gets the value of the Counter Compare A Mirror Register.
Definition: pwm.h:1170
PWM_disableInt
void PWM_disableInt(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) interrupt.
Definition: pwm.c:215
PWM_Number_7
Definition: pwm.h:723
PWM_setCmpAHr
static void PWM_setCmpAHr(PWM_Handle pwmHandle, const uint16_t pwmData)
Writes the pulse width modulation (PWM) data value to the Counter Compare A Hr hardware.
Definition: pwm.h:1756
PWM_HrControlMode_Phase
Definition: pwm.h:653
PWM_LoadMode_Either
Definition: pwm.h:708
PWM_get_CmpA
static uint16_t PWM_get_CmpA(PWM_Handle pwmHandle)
Gets the value of the Counter Compare A hardware.
Definition: pwm.h:1159
PWM_SocPulseSrc_CounterEqualZero
Definition: pwm.h:791
PWM_ChoppingPulseWidth_Four_Eighths_SysClkOut
Definition: pwm.h:530
_PWM_Obj_::TBSTS
volatile uint16_t TBSTS
Time-Base Status Register.
Definition: pwm.h:876
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_TripZoneFlag_DCBEVT1
Digital Compare B Event 1 Trip Zone flag.
Definition: pwm.h:854
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_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_TripZoneSrc_OneShot_TZ3_NOT
Definition: pwm.h:826
PWM_RunMode_SoftStopAfterDecr
Definition: pwm.h:751
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_SocPulseSrc_CounterEqualZeroOrPeriod
Definition: pwm.h:793
PWM_ChoppingClkFreq_SysClkOut_by_6
Definition: pwm.h:503
PWM_TripZoneFlag_OST
One Shot Trip Zone flag.
Definition: pwm.h:851
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_TripZoneDCEventSel_Disabled
Event Disabled.
Definition: pwm.h:862
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_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_ActionQual_Disabled
Definition: pwm.h:462
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_IntMode_CounterEqualZero
Definition: pwm.h:681
_PWM_Obj_::CMPAHR
volatile uint16_t CMPAHR
Extension of HRPWM Counter-Compare A Register.
Definition: pwm.h:883
PWM_incrementDeadBandRisingEdgeDelay
void PWM_incrementDeadBandRisingEdgeDelay(PWM_Handle pwmHandle)
Increment the dead band rising edge delay.
Definition: pwm.c:617
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_HspClkDiv_by_1
Definition: pwm.h:638
PWM_HspClkDiv_by_14
Definition: pwm.h:645
PWM_SyncMode_Disable
Definition: pwm.h:808
PWM_DeadBandOutputMode_Bypass
Definition: pwm.h:572
PWM_SyncMode_CounterEqualZero
Definition: pwm.h:806
PWM_clearIntFlag
static void PWM_clearIntFlag(PWM_Handle pwmHandle)
Clears the pulse width modulation (PWM) interrupt flag.
Definition: pwm.h:947
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_DigitalCompare_Input_e
PWM_DigitalCompare_Input_e
Enumeration to define the pulse width modulation (PWM) digital compare inputs.
Definition: pwm.h:592
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_ShadowMode_Immediate
Definition: pwm.h:762
PWM_TripZoneFlag_DCBEVT2
Digital Compare B Event 2 Trip Zone flag.
Definition: pwm.h:855
_PWM_Obj_::TZFLG
volatile uint16_t TZFLG
Trip zone interrupt flags.
Definition: pwm.h:897
PWM_ActionQual_Clear
Definition: pwm.h:463
PWM_TripZoneDCEventSel_DCxHL_DCxLH
Compare H = Low, Compare L = High.
Definition: pwm.h:867
PWM_DeadBandPolarity_EPWMxA_Inverted_EPWMxB_Inverted
Definition: pwm.h:586
_PWM_Obj_::DCFOFFSET
volatile uint16_t DCFOFFSET
Digital Compare Filter Offset.
Definition: pwm.h:924
PWM_IntMode_CounterEqualCmpAIncr
Definition: pwm.h:684
PWM_TZCLR_OST_BITS
#define PWM_TZCLR_OST_BITS
Defines the location of the OST bits in the TXCLR register.
Definition: pwm.h:335
PWM_ChoppingDutyCycle_Three_Eighths
Definition: pwm.h:515
PWM_setPeriod
void PWM_setPeriod(PWM_Handle pwmHandle, const uint16_t period)
Sets the pulse width modulation (PWM) period.
Definition: pwm.c:1250
PWM_TripZoneState_HighImp
Definition: pwm.h:839
PWM_TripZoneState_DoNothing
Definition: pwm.h:842
PWM_ChoppingPulseWidth_Eleven_Eighths_SysClkOut
Definition: pwm.h:537
PWM_RunMode_SoftStopAfterCycle
Definition: pwm.h:752
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_Obj_::HRPWR
volatile uint16_t HRPWR
HRPWM Power Register.
Definition: pwm.h:908
PWM_Number_e
PWM_Number_e
Enumeration to define the pulse width modulation (PWM) numbers.
Definition: pwm.h:715
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_DigitalCompare_InputSel_COMP1OUT
Definition: pwm.h:608
PWM_HrControlMode_Duty
Definition: pwm.h:652
PWM_HrEdgeMode_e
PWM_HrEdgeMode_e
Enumeration to define the pulse width modulation (PWM) high resolution edge mode options.
Definition: pwm.h:659
PWM_PeriodLoad_Shadow
Definition: pwm.h:732
PWM_IntPeriod_ThirdEvent
Definition: pwm.h:698
PWM_ChoppingPulseWidth_Sixteen_Eighths_SysClkOut
Definition: pwm.h:542
_PWM_Obj_::DCCAP
volatile uint16_t DCCAP
Digital Compare Filter Counter Capture.
Definition: pwm.h:928
PWM_TripZoneFlag_Global
Global Trip Zone flag.
Definition: pwm.h:849
PWM_DeadBandPolarity_EPWMxB_Inverted
Definition: pwm.h:585
PWM_HrEdgeMode_Disabled
Definition: pwm.h:661
PWM_HspClkDiv_by_2
Definition: pwm.h:639
PWM_setCmpB
static void PWM_setCmpB(PWM_Handle pwmHandle, const uint16_t pwmData)
Writes the pulse width modulation (PWM) data value to the Counter Compare B hardware.
Definition: pwm.h:1781
PWM_TripZoneState_EPWM_Low
Definition: pwm.h:841
PWM_ChoppingPulseWidth_Thirteen_Eighths_SysClkOut
Definition: pwm.h:539
PWM_DigitalCompare_InputSel_TZ2
Definition: pwm.h:606
_PWM_Obj_::CMPAM
volatile uint16_t CMPAM
Counter-Compare A mirror Register.
Definition: pwm.h:917
PWM_ClkDiv_by_16
Definition: pwm.h:487
_PWM_Obj_::CMPB
volatile uint16_t CMPB
Counter-Compare B Register.
Definition: pwm.h:885
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_TripZoneFlag_CBC
Cycle by cycle Trip Zone flag.
Definition: pwm.h:850
PWM_getIntCount
uint16_t PWM_getIntCount(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) interrupt event count.
Definition: pwm.c:492
PWM_ETCLR_SOCA_BITS
#define PWM_ETCLR_SOCA_BITS
Defines the location of the SOCA bits in the ETCLR register.
Definition: pwm.h:179
PWM_ChoppingPulseWidth_Nine_Eighths_SysClkOut
Definition: pwm.h:535
PWM_TripZoneSrc_e
PWM_TripZoneSrc_e
Enumeration to define the pulse width modulation (PWM) trip zone sources.
Definition: pwm.h:814
PWM_write_CmpB
static void PWM_write_CmpB(PWM_Handle pwmHandle, const uint16_t pwmData)
Writes the pulse width modulation (PWM) data value to the Counter Compare B hardware.
Definition: pwm.h:1768
PWM_HrEdgeMode_Both
Definition: pwm.h:664
PWM_ClkDiv_by_64
Definition: pwm.h:489
PWM_SocPeriod_FirstEvent
Definition: pwm.h:780
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