AM263Px MCU+ SDK: cmpss.h Source File

| AM263Px MCU+ SDK 26.00.00 |

cmpss/v0/cmpss.h
Go to the documentation of this file.
1 /********************************************************************
2 * Copyright (C) 2021-2023 Texas Instruments Incorporated.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the
14 * 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
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
42 #ifndef CMPSS_V0_H_
43 #define CMPSS_V0_H_
44
45 //*****************************************************************************
46 //
47 // If building with a C++ compiler, make all of the definitions in this header
48 // have a C binding.
49 //
50 //*****************************************************************************
51 #ifdef __cplusplus
52 extern "C"
53 {
54 #endif
55
56 //*****************************************************************************
57 //
59 //
60 //*****************************************************************************
61
62 #include <stdbool.h>
63 #include <stdint.h>
64 #include <drivers/hw_include/cslr_cmpss.h>
65 #include <drivers/hw_include/cslr_soc.h>
66 #include <drivers/hw_include/hw_types.h>
67 #include <kernel/dpl/DebugP.h>
68
69 //*****************************************************************************
70 //
71 // Useful defines used within the driver functions. Not intended for use by
72 // application code.
73 //
74 //*****************************************************************************
75 #define CMPSS_HICMP_CTL_M (CSL_CMPSSA_COMPCTL_COMPHSOURCE_MASK | \
76 CSL_CMPSSA_COMPCTL_COMPHINV_MASK | \
77 CSL_CMPSSA_COMPCTL_ASYNCHEN_MASK)
78
79 #define CMPSS_LOCMP_CTL_M (CSL_CMPSSA_COMPCTL_COMPLSOURCE_MASK | \
80 CSL_CMPSSA_COMPCTL_COMPLINV_MASK | \
81 CSL_CMPSSA_COMPCTL_ASYNCLEN_MASK)
82
83 //*****************************************************************************
84 //
85 // Values that can be passed to CMPSS_configLowComparator() and
86 // CMPSS_configHighComparator() as the config parameter.
87 //
88 //*****************************************************************************
89 //
90 // CMPSSAx Comparator High negative input source
91 //
93 #define CMPSS_INSRC_DAC (0x0000U)
94 #define CMPSS_INSRC_PIN (0x0001U)
96
97 //
98 // CMPSSAx Comparator Low positive input source
99 //
101 #define CMPSS_INSRC_PIN_INL (0x0000U)
102 #define CMPSS_INSRC_PIN_INH (0x0001U)
104
105 //
106 // Extra options
107 //
109 #define CMPSS_INV_INVERTED (0x0002U)
110 #define CMPSS_OR_ASYNC_OUT_W_FILT (0x0040U)
112
113 //*****************************************************************************
114 //
115 // Values that can be passed to CMPSS_configOutputsLow() and
116 // CMPSS_configOutputsHigh() as the config parameter.
117 //
118 //*****************************************************************************
119 //
120 // Signal driving CTRIPOUT
121 //
123 #define CMPSS_TRIPOUT_ASYNC_COMP (0x0000U)
124 #define CMPSS_TRIPOUT_SYNC_COMP (0x0010U)
126 #define CMPSS_TRIPOUT_FILTER (0x0020U)
128 #define CMPSS_TRIPOUT_LATCH (0x0030U)
130
131 //
132 // Signal driving CTRIP
133 //
135 #define CMPSS_TRIP_ASYNC_COMP (0x0000U)
136 #define CMPSS_TRIP_SYNC_COMP (0x0004U)
138 #define CMPSS_TRIP_FILTER (0x0008U)
140 #define CMPSS_TRIP_LATCH (0x000CU)
142
143 //*****************************************************************************
144 //
145 // Values that can be returned by CMPSS_getStatus().
146 //
147 //*****************************************************************************
149 #define CMPSS_STS_HI_FILTOUT (0x0001U)
150 #define CMPSS_STS_HI_LATCHFILTOUT (0x0002U)
152 #define CMPSS_STS_LO_FILTOUT (0x0100U)
154 #define CMPSS_STS_LO_LATCHFILTOUT (0x0200U)
156
157 //*****************************************************************************
158 //
159 // Values that can be passed to CMPSS_configDAC() the config parameter.
160 //
161 //*****************************************************************************
162 //
163 // When is DAC value loaded from shadow register
164 //
166 #define CMPSS_DACVAL_SYSCLK (0x0000U)
167 #define CMPSS_DACVAL_PWMSYNC (0x0080U)
169
170 //
171 // DAC reference voltage
172 //
174 #define CMPSS_DACREF_VDDA (0x0000U)
175 #define CMPSS_DACREF_VDAC (0x0020U)
177
178 //
179 // DAC value source
180 //
182 #define CMPSS_DACSRC_SHDW (0x0000U)
183 #define CMPSS_DACSRC_RAMP (0x0001U)
185
186 //*****************************************************************************
187 //
188 // Prototypes for the APIs.
189 //
190 //*****************************************************************************
191 //*****************************************************************************
192 //
200 //
201 //*****************************************************************************
202 static inline void
203 CMPSS_enableModule(uint32_t base)
204 {
205 //
206 // Set the bit that enables the CMPSS module.
207 //
208 HW_WR_REG16((base + CSL_CMPSSA_COMPCTL),
209 HW_RD_REG16(base + CSL_CMPSSA_COMPCTL) |
210 CSL_CMPSSA_COMPCTL_COMPDACE_MASK);
211 }
212
213 //*****************************************************************************
214 //
222 //
223 //*****************************************************************************
224 static inline void
225 CMPSS_disableModule(uint32_t base)
226 {
227 //
228 // Clear the bit that enables the CMPSS module.
229 //
230 HW_WR_REG16((base + CSL_CMPSSA_COMPCTL),
231 HW_RD_REG16(base + CSL_CMPSSA_COMPCTL) &
232 ~CSL_CMPSSA_COMPCTL_COMPDACE_MASK);
233 }
234
235 //*****************************************************************************
236 //
262 //
263 //*****************************************************************************
264 static inline void
265 CMPSS_configHighComparator(uint32_t base, uint16_t config)
266 {
267 //
268 // Write the high comparator configuration to the appropriate register.
269 //
270 HW_WR_REG16((base + CSL_CMPSSA_COMPCTL),
271 (HW_RD_REG16(base + CSL_CMPSSA_COMPCTL) & ~CMPSS_HICMP_CTL_M) | config);
272 }
273
274 //*****************************************************************************
275 //
301 //
302 //*****************************************************************************
303 static inline void
304 CMPSS_configLowComparator(uint32_t base, uint16_t config)
305 {
306 //
307 // Write the low comparator configuration to the appropriate register.
308 //
309 HW_WR_REG16((base + CSL_CMPSSA_COMPCTL),
310 (HW_RD_REG16(base + CSL_CMPSSA_COMPCTL) & ~CMPSS_LOCMP_CTL_M) |
311 (config << 8U));
312 }
313
314 //*****************************************************************************
315 //
340 //
341 //*****************************************************************************
342 static inline void
343 CMPSS_configOutputsHigh(uint32_t base, uint16_t config)
344 {
345 //
346 // Write the high comparator output settings to the appropriate register.
347 //
348 HW_WR_REG16((base + CSL_CMPSSA_COMPCTL),
349 (HW_RD_REG16(base + CSL_CMPSSA_COMPCTL) &
350 ~(CSL_CMPSSA_COMPCTL_CTRIPOUTHSEL_MASK |
351 CSL_CMPSSA_COMPCTL_CTRIPHSEL_MASK)) | config);
352 }
353
354 //*****************************************************************************
355 //
380 //
381 //*****************************************************************************
382 static inline void
383 CMPSS_configOutputsLow(uint32_t base, uint16_t config)
384 {
385 //
386 // Write the low comparator output settings to the appropriate register.
387 //
388 HW_WR_REG16((base + CSL_CMPSSA_COMPCTL),
389 (HW_RD_REG16(base + CSL_CMPSSA_COMPCTL) &
390 ~(CSL_CMPSSA_COMPCTL_CTRIPOUTLSEL_MASK |
391 CSL_CMPSSA_COMPCTL_CTRIPLSEL_MASK)) | (config << 8U));
392 }
393
394 //*****************************************************************************
395 //
410 //
411 //*****************************************************************************
412 static inline uint16_t
413 CMPSS_getStatus(uint32_t base)
414 {
415 //
416 // Return contents of the status register.
417 //
418 return(HW_RD_REG16(base + CSL_CMPSSA_COMPSTS));
419 }
420
421 //*****************************************************************************
422 //
452 //
453 //*****************************************************************************
454 static inline void
455 CMPSS_configDAC(uint32_t base, uint16_t config)
456 {
457 //
458 // Write the DAC configuration to the appropriate register.
459 //
460 HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL),
461 (HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL) &
462 ~(CSL_CMPSSA_COMPDACCTL_SWLOADSEL_MASK |
463 CSL_CMPSSA_COMPDACCTL_SELREF_MASK |
464 CSL_CMPSSA_COMPDACCTL_DACSOURCE_MASK)) | config);
465 }
466
467 //*****************************************************************************
468 //
480 //
481 //*****************************************************************************
482 static inline void
483 CMPSS_setDACValueHigh(uint32_t base, uint16_t value)
484 {
485 DebugP_assert(value < 4096U);
486
487 //
488 // Write the DAC value to the DAC value shadow register.
489 //
490 HW_WR_REG16((base + CSL_CMPSSA_DACHVALS), value);
491 }
492
493 //*****************************************************************************
494 //
506 //
507 //*****************************************************************************
508 static inline void
509 CMPSS_setDACValueLow(uint32_t base, uint16_t value)
510 {
511 DebugP_assert(value < 4096U);
512
513 //
514 // Write the DAC value to the DAC value shadow register.
515 //
516 HW_WR_REG16((base + CSL_CMPSSA_DACLVALS), value);
517 }
518
519 //*****************************************************************************
520 //
532 //
533 //*****************************************************************************
534 static inline void
535 CMPSS_initFilterHigh(uint32_t base)
536 {
537 //
538 // Set the high comparator filter initialization bit.
539 //
540 HW_WR_REG16((base + CSL_CMPSSA_CTRIPHFILCTL),
541 HW_RD_REG16(base + CSL_CMPSSA_CTRIPHFILCTL) |
542 CSL_CMPSSA_CTRIPHFILCTL_FILINIT_MASK);
543 }
544
545 //*****************************************************************************
546 //
558 //
559 //*****************************************************************************
560 static inline void
561 CMPSS_initFilterLow(uint32_t base)
562 {
563 //
564 // Set the low comparator filter initialization bit.
565 //
566 HW_WR_REG16((base + CSL_CMPSSA_CTRIPLFILCTL),
567 HW_RD_REG16(base + CSL_CMPSSA_CTRIPLFILCTL) |
568 CSL_CMPSSA_CTRIPLFILCTL_FILINIT_MASK);
569 }
570
571 //*****************************************************************************
572 //
582 //
583 //*****************************************************************************
584 static inline uint16_t
585 CMPSS_getDACValueHigh(uint32_t base)
586 {
587 //
588 // Write the DAC value to the DAC value shadow register.
589 //
590 return(HW_RD_REG16(base + CSL_CMPSSA_DACHVALA));
591 }
592
593 //*****************************************************************************
594 //
604 //
605 //*****************************************************************************
606 static inline uint16_t
607 CMPSS_getDACValueLow(uint32_t base)
608 {
609 //
610 // Write the DAC value to the DAC value shadow register.
611 //
612 return(HW_RD_REG16(base + CSL_CMPSSA_DACLVALA));
613 }
614
615 //*****************************************************************************
616 //
625 //
626 //*****************************************************************************
627 static inline void
628 CMPSS_clearFilterLatchHigh(uint32_t base)
629 {
630 //
631 // Set the bit that generates a reset pulse to the digital filter latch.
632 //
633 HW_WR_REG16((base + CSL_CMPSSA_COMPSTSCLR),
634 HW_RD_REG16(base + CSL_CMPSSA_COMPSTSCLR) |
635 CSL_CMPSSA_COMPSTSCLR_HLATCHCLR_MASK);
636 }
637
638 //*****************************************************************************
639 //
648 //
649 //*****************************************************************************
650 static inline void
651 CMPSS_clearFilterLatchLow(uint32_t base)
652 {
653 //
654 // Set the bit that generates a reset pulse to the digital filter latch.
655 //
656 HW_WR_REG16((base + CSL_CMPSSA_COMPSTSCLR),
657 HW_RD_REG16(base + CSL_CMPSSA_COMPSTSCLR) |
658 CSL_CMPSSA_COMPSTSCLR_LLATCHCLR_MASK);
659 }
660
661 //*****************************************************************************
662 //
672 //
673 //*****************************************************************************
674 static inline void
675 CMPSS_setMaxRampValue(uint32_t base, uint16_t value)
676 {
677 //
678 // Write the maximum ramp value to the shadow register.
679 //
680 HW_WR_REG16((base + CSL_CMPSSA_RAMPMAXREFS), value);
681 }
682
683 //*****************************************************************************
684 //
691 //
692 //*****************************************************************************
693 static inline uint16_t
694 CMPSS_getMaxRampValue(uint32_t base)
695 {
696 //
697 // Read the maximum ramp value from the register.
698 //
699 return(HW_RD_REG16(base + CSL_CMPSSA_RAMPMAXREFA));
700 }
701
702 //*****************************************************************************
703 //
713 //
714 //*****************************************************************************
715 static inline void
716 CMPSS_setRampDecValue(uint32_t base, uint16_t value)
717 {
718 //
719 // Write the ramp decrement value to the shadow register.
720 //
721 HW_WR_REG16((base + CSL_CMPSSA_RAMPDECVALS), value);
722 }
723
724 //*****************************************************************************
725 //
732 //
733 //*****************************************************************************
734 static inline uint16_t
735 CMPSS_getRampDecValue(uint32_t base)
736 {
737 //
738 // Read the ramp decrement value from the register.
739 //
740 return(HW_RD_REG16(base + CSL_CMPSSA_RAMPDECVALA));
741 }
742
743 //*****************************************************************************
744 //
755 //
756 //*****************************************************************************
757 static inline void
758 CMPSS_setRampDelayValue(uint32_t base, uint16_t value)
759 {
760 DebugP_assert(value < 8192U);
761
762 //
763 // Write the ramp delay value to the shadow register.
764 //
765 HW_WR_REG16((base + CSL_CMPSSA_RAMPDLYS), value);
766 }
767
768 //*****************************************************************************
769 //
776 //
777 //*****************************************************************************
778 static inline uint16_t
779 CMPSS_getRampDelayValue(uint32_t base)
780 {
781 //
782 // Read the ramp delay value from the register.
783 //
784 return(HW_RD_REG16(base + CSL_CMPSSA_RAMPDLYA));
785 }
786
787 //*****************************************************************************
788 //
802 //
803 //*****************************************************************************
804 static inline void
805 CMPSS_configBlanking(uint32_t base, uint16_t pwmBlankSrc)
806 {
807 DebugP_assert((pwmBlankSrc >= 1U) && (pwmBlankSrc <= 32U));
808
809 //
810 // Write the blank source number to the appropriate register.
811 //
812
813 //Program COMPDACCTL and COMPDACCTL2
814 HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL),
815 (HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL) &
816 ~CSL_CMPSSA_COMPDACCTL_BLANKSOURCE_MASK) | (((pwmBlankSrc - 1U)&0xFU) <<
817 CSL_CMPSSA_COMPDACCTL_BLANKSOURCE_SHIFT));
818
819
820 HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL2),
821 (HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL2) &
822 ~CSL_CMPSSA_COMPDACCTL2_BLANKSOURCEUSEL_MASK) | ((((pwmBlankSrc-1U)>>4U) <<
823 CSL_CMPSSA_COMPDACCTL2_BLANKSOURCEUSEL_SHIFT) &
824 CSL_CMPSSA_COMPDACCTL2_BLANKSOURCEUSEL_MASK));
825 }
826
827 //*****************************************************************************
828 //
837 //
838 //*****************************************************************************
839 static inline void
840 CMPSS_enableBlanking(uint32_t base)
841 {
842 //
843 // Set the bit that enables the PWMBLANK signal.
844 //
845 HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL),
846 HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL) |
847 CSL_CMPSSA_COMPDACCTL_BLANKEN_MASK);
848 }
849
850 //*****************************************************************************
851 //
860 //
861 //*****************************************************************************
862 static inline void
863 CMPSS_disableBlanking(uint32_t base)
864 {
865 //
866 // Clear the bit that enables the PWMBLANK signal.
867 //
868 HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL),
869 HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL) &
870 ~CSL_CMPSSA_COMPDACCTL_BLANKEN_MASK);
871 }
872
873 //*****************************************************************************
874 //
882 //
883 //*****************************************************************************
884 static inline void
885 CMPSS_enableDEmode(uint32_t base)
886 {
887 HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL2),
888 HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL2) |
889 ((0x1U<<CSL_CMPSSA_COMPDACCTL2_DEENABLE_SHIFT) &
890 CSL_CMPSSA_COMPDACCTL2_DEENABLE_MASK));
891
892 }
893
894 //*****************************************************************************
895 //
903 //
904 //*****************************************************************************
905 static inline void
906 CMPSS_disableDEmode(uint32_t base)
907 {
908 HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL2),
909 HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL2) &
910 ~((0x1U<<CSL_CMPSSA_COMPDACCTL2_DEENABLE_SHIFT) &
911 CSL_CMPSSA_COMPDACCTL2_DEENABLE_MASK));
912 }
913
914 //*****************************************************************************
915 //
924 //
925 //*****************************************************************************
926 static inline void
927 CMPSS_selectDEACTIVESource(uint32_t base, uint8_t deactivesel)
928 {
929 HW_WR_REG16((base + CSL_CMPSSA_COMPDACCTL2),
930 (HW_RD_REG16(base + CSL_CMPSSA_COMPDACCTL2) &
931 ~CSL_CMPSSA_COMPDACCTL2_DEACTIVESEL_MASK) |
932 ((deactivesel << CSL_CMPSSA_COMPDACCTL2_DEACTIVESEL_SHIFT) &
933 CSL_CMPSSA_COMPDACCTL2_DEACTIVESEL_MASK));
934 }
935
936 //*****************************************************************************
937 //
948 //
949 //*****************************************************************************
950 static inline void
951 CMPSS_configHighDACShadowValue2(uint32_t base, uint16_t dacval)
952 {
953 HW_WR_REG16((base + CSL_CMPSSA_DACHVALS2),
954 dacval & CSL_CMPSSA_DACHVALS2_DACVAL_MASK);
955 }
956
957 //*****************************************************************************
958 //
969 //
970 //*****************************************************************************
971 static inline void
972 CMPSS_configLowDACShadowValue2(uint32_t base, uint16_t dacval)
973 {
974 HW_WR_REG16((base + CSL_CMPSSA_DACLVALS2),
975 dacval & CSL_CMPSSA_DACLVALS2_DACVAL_MASK);
976 }
977
978 //*****************************************************************************
979 //
998 //
999 //*****************************************************************************
1000 static inline void
1001 CMPSS_setComparatorHighHysteresis(uint32_t base, uint16_t value)
1002 {
1003 HW_WR_REG16((base + CSL_CMPSSA_CONFIG1),
1004 (HW_RD_REG16(base + CSL_CMPSSA_CONFIG1) &
1005 (~CSL_CMPSSA_CONFIG1_COMPHHYS_MASK)) |
1006 (CSL_CMPSSA_CONFIG1_COMPHHYS_MASK &
1007 (value << CSL_CMPSSA_CONFIG1_COMPHHYS_SHIFT))
1008 );
1009 }
1010
1011 //*****************************************************************************
1012 //
1031 //
1032 //*****************************************************************************
1033 static inline void
1034 CMPSS_setComparatorLowHysteresis(uint32_t base, uint16_t value)
1035 {
1036 HW_WR_REG16((base + CSL_CMPSSA_CONFIG1),
1037 (HW_RD_REG16(base + CSL_CMPSSA_CONFIG1) &
1038 (~CSL_CMPSSA_CONFIG1_COMPLHYS_MASK)) |
1039 (CSL_CMPSSA_CONFIG1_COMPLHYS_MASK &
1040 (value << CSL_CMPSSA_CONFIG1_COMPLHYS_SHIFT))
1041 );
1042 }
1043
1044
1045 //*****************************************************************************
1046 //
1087 //
1088 //*****************************************************************************
1089 extern void
1090 CMPSS_configFilterHigh(uint32_t base, uint16_t samplePrescale,
1091 uint16_t sampleWindow, uint16_t threshold);
1092
1093 //*****************************************************************************
1094 //
1135 //
1136 //*****************************************************************************
1137 extern void
1138 CMPSS_configFilterLow(uint32_t base, uint16_t samplePrescale,
1139 uint16_t sampleWindow, uint16_t threshold);
1140
1141 //*****************************************************************************
1142 //
1157 //
1158 //*****************************************************************************
1159 extern void
1160 CMPSS_configLatchOnPWMSYNC(uint32_t base, bool highEnable, bool lowEnable);
1161
1162 //*****************************************************************************
1163 //
1198 //
1199 //*****************************************************************************
1200 extern void
1201 CMPSS_configRamp(uint32_t base, uint16_t maxRampVal, uint16_t decrementVal,
1202 uint16_t delayVal, uint16_t pwmSyncSrc, bool useRampValShdw);
1203
1204 //*****************************************************************************
1205 //
1206 // Close the Doxygen group.
1208 //
1209 //*****************************************************************************
1210
1211 //*****************************************************************************
1212 //
1213 // Mark the end of the C bindings section for C++ compilers.
1214 //
1215 //*****************************************************************************
1216 #ifdef __cplusplus
1217 }
1218 #endif
1219
1220 #endif // CMPSS_V0_H_
CMPSS_clearFilterLatchLow
static void CMPSS_clearFilterLatchLow(uint32_t base)
Definition: cmpss/v0/cmpss.h:651
CMPSS_setRampDecValue
static void CMPSS_setRampDecValue(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:716
CMPSS_configHighDACShadowValue2
static void CMPSS_configHighDACShadowValue2(uint32_t base, uint16_t dacval)
Definition: cmpss/v0/cmpss.h:951
CMPSS_setRampDelayValue
static void CMPSS_setRampDelayValue(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:758
CMPSS_LOCMP_CTL_M
#define CMPSS_LOCMP_CTL_M
Definition: cmpss/v0/cmpss.h:79
CMPSS_disableModule
static void CMPSS_disableModule(uint32_t base)
Definition: cmpss/v0/cmpss.h:225
CMPSS_selectDEACTIVESource
static void CMPSS_selectDEACTIVESource(uint32_t base, uint8_t deactivesel)
Definition: cmpss/v0/cmpss.h:927
CMPSS_setComparatorHighHysteresis
static void CMPSS_setComparatorHighHysteresis(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:1001
CMPSS_enableDEmode
static void CMPSS_enableDEmode(uint32_t base)
Definition: cmpss/v0/cmpss.h:885
CMPSS_configOutputsLow
static void CMPSS_configOutputsLow(uint32_t base, uint16_t config)
Definition: cmpss/v0/cmpss.h:383
CMPSS_configOutputsHigh
static void CMPSS_configOutputsHigh(uint32_t base, uint16_t config)
Definition: cmpss/v0/cmpss.h:343
CMPSS_enableModule
static void CMPSS_enableModule(uint32_t base)
Definition: cmpss/v0/cmpss.h:203
CMPSS_configDAC
static void CMPSS_configDAC(uint32_t base, uint16_t config)
Definition: cmpss/v0/cmpss.h:455
CMPSS_getStatus
static uint16_t CMPSS_getStatus(uint32_t base)
Definition: cmpss/v0/cmpss.h:413
CMPSS_configRamp
void CMPSS_configRamp(uint32_t base, uint16_t maxRampVal, uint16_t decrementVal, uint16_t delayVal, uint16_t pwmSyncSrc, bool useRampValShdw)
CMPSS_setComparatorLowHysteresis
static void CMPSS_setComparatorLowHysteresis(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:1034
CMPSS_HICMP_CTL_M
#define CMPSS_HICMP_CTL_M
Header Files.
Definition: cmpss/v0/cmpss.h:75
CMPSS_setDACValueLow
static void CMPSS_setDACValueLow(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:509
CMPSS_getMaxRampValue
static uint16_t CMPSS_getMaxRampValue(uint32_t base)
Definition: cmpss/v0/cmpss.h:694
CMPSS_configHighComparator
static void CMPSS_configHighComparator(uint32_t base, uint16_t config)
Definition: cmpss/v0/cmpss.h:265
CMPSS_configLowDACShadowValue2
static void CMPSS_configLowDACShadowValue2(uint32_t base, uint16_t dacval)
Definition: cmpss/v0/cmpss.h:972
CMPSS_setDACValueHigh
static void CMPSS_setDACValueHigh(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:483
CMPSS_getRampDecValue
static uint16_t CMPSS_getRampDecValue(uint32_t base)
Definition: cmpss/v0/cmpss.h:735
CMPSS_getDACValueLow
static uint16_t CMPSS_getDACValueLow(uint32_t base)
Definition: cmpss/v0/cmpss.h:607
CMPSS_getRampDelayValue
static uint16_t CMPSS_getRampDelayValue(uint32_t base)
Definition: cmpss/v0/cmpss.h:779
CMPSS_configBlanking
static void CMPSS_configBlanking(uint32_t base, uint16_t pwmBlankSrc)
Definition: cmpss/v0/cmpss.h:805
CMPSS_initFilterLow
static void CMPSS_initFilterLow(uint32_t base)
Definition: cmpss/v0/cmpss.h:561
DebugP.h
CMPSS_initFilterHigh
static void CMPSS_initFilterHigh(uint32_t base)
Definition: cmpss/v0/cmpss.h:535
CMPSS_setMaxRampValue
static void CMPSS_setMaxRampValue(uint32_t base, uint16_t value)
Definition: cmpss/v0/cmpss.h:675
CMPSS_clearFilterLatchHigh
static void CMPSS_clearFilterLatchHigh(uint32_t base)
Definition: cmpss/v0/cmpss.h:628
CMPSS_getDACValueHigh
static uint16_t CMPSS_getDACValueHigh(uint32_t base)
Definition: cmpss/v0/cmpss.h:585
CMPSS_enableBlanking
static void CMPSS_enableBlanking(uint32_t base)
Definition: cmpss/v0/cmpss.h:840
DebugP_assert
#define DebugP_assert(expression)
Function to call for assert check.
Definition: DebugP.h:187
CMPSS_configFilterLow
void CMPSS_configFilterLow(uint32_t base, uint16_t samplePrescale, uint16_t sampleWindow, uint16_t threshold)
CMPSS_configLatchOnPWMSYNC
void CMPSS_configLatchOnPWMSYNC(uint32_t base, bool highEnable, bool lowEnable)
CMPSS_disableDEmode
static void CMPSS_disableDEmode(uint32_t base)
Definition: cmpss/v0/cmpss.h:906
CMPSS_configFilterHigh
void CMPSS_configFilterHigh(uint32_t base, uint16_t samplePrescale, uint16_t sampleWindow, uint16_t threshold)
CMPSS_configLowComparator
static void CMPSS_configLowComparator(uint32_t base, uint16_t config)
Definition: cmpss/v0/cmpss.h:304
CMPSS_disableBlanking
static void CMPSS_disableBlanking(uint32_t base)
Definition: cmpss/v0/cmpss.h:863