This module contains APIs to program and use the SDFM module.
Data Structures | |
struct | SDFM_CompEventFilterConfig |
Functions | |
static void | SDFM_enableExternalReset (uint32_t base, uint32_t filterNumber) |
static void | SDFM_disableExternalReset (uint32_t base, uint32_t filterNumber) |
static void | SDFM_enableFilter (uint32_t base, uint32_t filterNumber) |
static void | SDFM_disableFilter (uint32_t base, uint32_t filterNumber) |
static void | SDFM_enableFIFOBuffer (uint32_t base, uint32_t filterNumber) |
static void | SDFM_disableFIFOBuffer (uint32_t base, uint32_t filterNumber) |
static bool | SDFM_getZeroCrossTripStatus (uint32_t base, uint32_t filterNumber) |
static void | SDFM_clearZeroCrossTripStatus (uint32_t base, uint32_t filterNumber) |
static void | SDFM_enableComparator (uint32_t base, uint32_t filterNumber) |
static void | SDFM_disableComparator (uint32_t base, uint32_t filterNumber) |
static void | SDFM_selectCompEventSource (uint32_t base, uint32_t filterNumber, uint32_t compEventNum, uint32_t compEventSource) |
static void | SDFM_setFilterType (uint32_t base, uint32_t filterNumber, uint32_t filterType) |
static void | SDFM_setFilterOverSamplingRatio (uint32_t base, uint32_t filterNumber, uint16_t overSamplingRatio) |
static void | SDFM_setupModulatorClock (uint32_t base, uint32_t filterNumber, uint32_t clockMode) |
static void | SDFM_setOutputDataFormat (uint32_t base, uint32_t filterNumber, uint32_t dataFormat) |
static void | SDFM_setDataShiftValue (uint32_t base, uint32_t filterNumber, uint16_t shiftValue) |
static void | SDFM_setCompFilterHighThreshold (uint32_t base, uint32_t filterNumber, uint32_t highThreshold) |
static void | SDFM_setCompFilterLowThreshold (uint32_t base, uint32_t filterNumber, uint32_t lowThreshold) |
static void | SDFM_setCompFilterZeroCrossThreshold (uint32_t base, uint32_t filterNumber, uint16_t zeroCrossThreshold) |
static void | SDFM_enableZeroCrossEdgeDetect (uint32_t base, uint32_t filterNumber) |
static void | SDFM_disableZeroCrossEdgeDetect (uint32_t base, uint32_t filterNumber) |
static void | SDFM_enableInterrupt (uint32_t base, uint32_t filterNumber, uint16_t intFlags) |
static void | SDFM_disableInterrupt (uint32_t base, uint32_t filterNumber, uint16_t intFlags) |
static void | SDFM_setComparatorFilterType (uint32_t base, uint32_t filterNumber, uint32_t filterType) |
static void | SDFM_setCompFilterOverSamplingRatio (uint32_t base, uint32_t filterNumber, uint16_t overSamplingRatio) |
static uint32_t | SDFM_getFilterData (uint32_t base, uint32_t filterNumber) |
static uint32_t | SDFM_getThresholdStatus (uint32_t base, uint32_t filterNumber) |
static bool | SDFM_getModulatorStatus (uint32_t base, uint32_t filterNumber) |
static bool | SDFM_getNewFilterDataStatus (uint32_t base, uint32_t filterNumber) |
static bool | SDFM_getFIFOOverflowStatus (uint32_t base, uint32_t filterNumber) |
static bool | SDFM_getFIFOISRStatus (uint32_t base, uint32_t filterNumber) |
static bool | SDFM_getIsrStatus (uint32_t base) |
static void | SDFM_clearInterruptFlag (uint32_t base, uint32_t flag) |
static void | SDFM_enableMainInterrupt (uint32_t base) |
static void | SDFM_disableMainInterrupt (uint32_t base) |
static void | SDFM_enableMainFilter (uint32_t base) |
static void | SDFM_disableMainFilter (uint32_t base) |
static uint16_t | SDFM_getFIFODataCount (uint32_t base, uint32_t filterNumber) |
static uint16_t | SDFM_getComparatorSincData (uint32_t base, uint32_t filterNumber) |
static uint32_t | SDFM_getFIFOData (uint32_t base, uint32_t filterNumber) |
static void | SDFM_setFIFOInterruptLevel (uint32_t base, uint32_t filterNumber, uint16_t fifoLevel) |
static void | SDFM_setDataReadyInterruptSource (uint32_t base, uint32_t filterNumber, uint32_t dataReadySource) |
static bool | SDFM_getWaitForSyncStatus (uint32_t base, uint32_t filterNumber) |
static void | SDFM_clearWaitForSyncFlag (uint32_t base, uint32_t filterNumber) |
static void | SDFM_enableWaitForSync (uint32_t base, uint32_t filterNumber) |
static void | SDFM_disableWaitForSync (uint32_t base, uint32_t filterNumber) |
static void | SDFM_setPWMSyncSource (uint32_t base, uint32_t filterNumber, uint32_t syncSource) |
static void | SDFM_setFIFOClearOnSyncMode (uint32_t base, uint32_t filterNumber, uint32_t fifoClearSyncMode) |
static void | SDFM_setWaitForSyncClearMode (uint32_t base, uint32_t filterNumber, uint32_t syncClearMode) |
static void | SDFM_selectClockSource (uint32_t base, uint32_t filterNumber, uint32_t clkSource) |
static void | SDFM_enableSynchronizer (uint32_t base, uint32_t filterNumber, uint16_t syncConfig) |
static void | SDFM_disableSynchronizer (uint32_t base, uint32_t filterNumber, uint16_t syncConfig) |
static void | SDFM_selectCompEventHighSource (uint32_t base, uint32_t filterNumber, uint32_t source) |
static void | SDFM_selectCompEventLowSource (uint32_t base, uint32_t filterNumber, uint32_t source) |
static void | SDFM_initCompEventLowFilter (uint32_t base, uint32_t filterNumber) |
static void | SDFM_initCompEventHighFilter (uint32_t base, uint32_t filterNumber) |
static void | SDFM_lockCompEventFilterConfig (uint32_t base, uint32_t filterNumber, uint16_t lockConfig) |
void | SDFM_configComparator (uint32_t base, uint16_t config1, uint32_t config2, uint16_t config3) |
void | SDFM_configEnhancedComparator (uint32_t base, uint16_t filterConfig, uint32_t highLowThreshold1, uint32_t highLowThreshold2, uint16_t zeroCrossThreshold) |
void | SDFM_configDataFilter (uint32_t base, uint16_t config1, uint16_t config2) |
void | SDFM_configZeroCrossComparator (uint32_t base, uint16_t config1, uint16_t config2) |
void | SDFM_configDataFilterFIFO (uint32_t base, uint16_t config1, uint16_t config2) |
void | SDFM_configCompEventLowFilter (uint32_t base, uint32_t filterNumber, const SDFM_CompEventFilterConfig *config) |
void | SDFM_configCompEventHighFilter (uint32_t base, uint32_t filterNumber, const SDFM_CompEventFilterConfig *config) |
Macros | |
#define | SDFM_GET_LOW_THRESHOLD(C) ((uint16_t)(C)) |
Header Files. More... | |
#define | SDFM_GET_HIGH_THRESHOLD(C) ((uint16_t)((uint32_t)(C) >> 16U)) |
Macro to get the high threshold. More... | |
#define | SDFM_GET_LOW_THRESHOLD_BOTH(C1, C2) |
#define | SDFM_GET_HIGH_THRESHOLD_BOTH(C1, C2) |
#define | SDFM_SET_OSR(X) (((X) - 1) << 8U) |
Macro to convert comparator over sampling ratio to acceptable bit location. More... | |
#define | SDFM_SHIFT_VALUE(X) ((X) << 2U) |
Macro to convert the data shift bit values to acceptable bit location. More... | |
#define | SDFM_THRESHOLD(H, L) ((((uint32_t)(H)) << 16U) | (L)) |
Macro to combine high threshold and low threshold values. More... | |
#define | SDFM_SET_FIFO_LEVEL(X) ((X) << 7U) |
Macro to set the FIFO level to acceptable bit location. More... | |
#define | SDFM_SET_ZERO_CROSS_THRESH_VALUE(X) (0x8000 | (X)) |
Macro to set and enable the zero cross threshold value. More... | |
#define | SDFM_FILTER_DISABLE (0x0U) |
Macros to enable or disable filter. More... | |
#define | SDFM_FILTER_ENABLE (0x2U) |
#define | SDFM_SDFIL_OFFSET (CSL_SDFM_SDCTLPARM2 - CSL_SDFM_SDCTLPARM1) |
< SD filter offset More... | |
#define | SDFM_DIGFIL_OFFSET (CSL_SDFM_SDCOMP2CTL - CSL_SDFM_SDCOMP1CTL) |
Offset between high threshold 1 & 2 registers. More... | |
#define | SDFM_SDFLT1CMPHx_OFFSET (CSL_SDFM_SDFLT1CMPH2 - CSL_SDFM_SDFLT1CMPH1) |
Offset between low threshold 1 & 2 registers. More... | |
#define | SDFM_SDFLT1CMPLx_OFFSET (CSL_SDFM_SDFLT1CMPL2 - CSL_SDFM_SDFLT1CMPL1) |
#define | SDFM_COMPEVT_FILTER_CONFIG_M |
#define | SDFM_COMPEVT_FILTER_LOCK_M |
#define | SDFM_CLOCK_SYNCHRONIZER CSL_SDFM_SDCTLPARM1_SDCLKSYNC_MASK |
Define for Clock synchronizer Configuration. More... | |
#define | SDFM_DATA_SYNCHRONIZER CSL_SDFM_SDCTLPARM1_SDDATASYNC_MASK |
Define for Data Synchronizer Configuration. More... | |
#define | SDFM_OUTPUT_WITHIN_THRESHOLD (0) |
Values that can be returned from SDFM_getThresholdStatus() More... | |
#define | SDFM_OUTPUT_ABOVE_THRESHOLD (1) |
SDFM output is above threshold. More... | |
#define | SDFM_OUTPUT_BELOW_THRESHOLD (2) |
SDFM output is below threshold. More... | |
#define | SDFM_FILTER_1 (0) |
Digital filter 1. More... | |
#define | SDFM_FILTER_2 (1) |
Digital filter 2. More... | |
#define | SDFM_FILTER_3 (2) |
Digital filter 3. More... | |
#define | SDFM_FILTER_4 (3) |
Digital filter 4. More... | |
#define | SDFM_FILTER_SINC_FAST (0x00) |
Digital filter with SincFast structure. More... | |
#define | SDFM_FILTER_SINC_1 (0x10) |
Digital filter with Sinc1 structure. More... | |
#define | SDFM_FILTER_SINC_2 (0x20) |
Digital filter with Sinc3 structure. More... | |
#define | SDFM_FILTER_SINC_3 (0x30) |
Digital filter with Sinc4 structure. More... | |
#define | SDFM_MODULATOR_CLK_EQUAL_DATA_RATE (0) |
Modulator clock is identical to the data rate. More... | |
#define | SDFM_DATA_FORMAT_16_BIT (0) |
Filter output is in 16 bits 2's complement format. More... | |
#define | SDFM_DATA_FORMAT_32_BIT (1) |
Filter output is in 32 bits 2's complement format. More... | |
#define | SDFM_DATA_READY_SOURCE_DIRECT (0) |
Data ready interrupt source is direct (non -FIFO). More... | |
#define | SDFM_DATA_READY_SOURCE_FIFO (1) |
Data ready interrupt source is FIFO. More... | |
#define | SDFM_SYNC_PWM0_SOCA (0) |
SDFM sync source is PWM1 SOCA. More... | |
#define | SDFM_SYNC_PWM0_SOCB (1) |
SDFM sync source is PWM1 SOCB. More... | |
#define | SDFM_SYNC_PWM1_SOCA (2) |
SDFM sync source is PWM2 SOCA. More... | |
#define | SDFM_SYNC_PWM1_SOCB (3) |
SDFM sync source is PWM2 SOCB. More... | |
#define | SDFM_SYNC_PWM2_SOCA (4) |
SDFM sync source is PWM3 SOCA. More... | |
#define | SDFM_SYNC_PWM2_SOCB (5) |
SDFM sync source is PWM3 SOCB. More... | |
#define | SDFM_SYNC_PWM3_SOCA (6) |
SDFM sync source is PWM4 SOCA. More... | |
#define | SDFM_SYNC_PWM3_SOCB (7) |
SDFM sync source is PWM4 SOCB. More... | |
#define | SDFM_SYNC_PWM4_SOCA (8) |
SDFM sync source is PWM5 SOCA. More... | |
#define | SDFM_SYNC_PWM4_SOCB (9) |
SDFM sync source is PWM5 SOCB. More... | |
#define | SDFM_SYNC_PWM5_SOCA (10) |
SDFM sync source is PWM6 SOCA. More... | |
#define | SDFM_SYNC_PWM5_SOCB (11) |
SDFM sync source is PWM6 SOCB. More... | |
#define | SDFM_SYNC_PWM6_SOCA (12) |
SDFM sync source is PWM7 SOCA. More... | |
#define | SDFM_SYNC_PWM6_SOCB (13) |
SDFM sync source is PWM7 SOCB. More... | |
#define | SDFM_SYNC_PWM7_SOCA (14) |
SDFM sync source is PWM8 SOCA. More... | |
#define | SDFM_SYNC_PWM7_SOCB (15) |
SDFM sync source is PWM8 SOCB. More... | |
#define | SDFM_SYNC_PWM8_SOCA (16) |
SDFM sync source is PWM9 SOCA. More... | |
#define | SDFM_SYNC_PWM8_SOCB (17) |
SDFM sync source is PWM9 SOCB. More... | |
#define | SDFM_SYNC_PWM9_SOCA (18) |
SDFM sync source is PWM10 SOCA. More... | |
#define | SDFM_SYNC_PWM9_SOCB (19) |
SDFM sync source is PWM10 SOCB. More... | |
#define | SDFM_SYNC_PWM10_SOCA (20) |
SDFM sync source is PWM11 SOCA. More... | |
#define | SDFM_SYNC_PWM10_SOCB (21) |
SDFM sync source is PWM11 SOCB. More... | |
#define | SDFM_SYNC_PWM11_SOCA (22) |
SDFM sync source is PWM12 SOCA. More... | |
#define | SDFM_SYNC_PWM11_SOCB (23) |
SDFM sync source is PWM12 SOCB. More... | |
#define | SDFM_SYNC_PWM12_SOCA (24) |
SDFM sync source is PWM13 SOCA. More... | |
#define | SDFM_SYNC_PWM12_SOCB (25) |
SDFM sync source is PWM13 SOCB. More... | |
#define | SDFM_SYNC_PWM13_SOCA (26) |
SDFM sync source is PWM14 SOCA. More... | |
#define | SDFM_SYNC_PWM13_SOCB (27) |
SDFM sync source is PWM14 SOCB. More... | |
#define | SDFM_SYNC_PWM14_SOCA (28) |
SDFM sync source is PWM15 SOCA. More... | |
#define | SDFM_SYNC_PWM14_SOCB (29) |
SDFM sync source is PWM15 SOCB. More... | |
#define | SDFM_SYNC_PWM15_SOCA (30) |
SDFM sync source is PWM16 SOCA. More... | |
#define | SDFM_SYNC_PWM15_SOCB (31) |
SDFM sync source is PWM16 SOCB. More... | |
#define | SDFM_SYNC_PWM16_SOCA (32) |
SDFM sync source is PWM17 SOCA. More... | |
#define | SDFM_SYNC_PWM16_SOCB (33) |
SDFM sync source is PWM17 SOCB. More... | |
#define | SDFM_SYNC_PWM17_SOCA (34) |
SDFM sync source is PWM18 SOCA. More... | |
#define | SDFM_SYNC_PWM17_SOCB (35) |
SDFM sync source is PWM18 SOCB. More... | |
#define | SDFM_SYNC_PWM18_SOCA (36) |
SDFM sync source is PWM19 SOCA. More... | |
#define | SDFM_SYNC_PWM18_SOCB (37) |
SDFM sync source is PWM19 SOCB. More... | |
#define | SDFM_SYNC_PWM19_SOCA (38) |
SDFM sync source is PWM20 SOCA. More... | |
#define | SDFM_SYNC_PWM19_SOCB (39) |
SDFM sync source is PWM20 SOCB. More... | |
#define | SDFM_SYNC_PWM20_SOCA (40) |
SDFM sync source is PWM21 SOCA. More... | |
#define | SDFM_SYNC_PWM20_SOCB (41) |
SDFM sync source is PWM21 SOCB. More... | |
#define | SDFM_SYNC_PWM21_SOCA (42) |
SDFM sync source is PWM22 SOCA. More... | |
#define | SDFM_SYNC_PWM21_SOCB (43) |
SDFM sync source is PWM22 SOCB. More... | |
#define | SDFM_SYNC_PWM22_SOCA (44) |
SDFM sync source is PWM23 SOCA. More... | |
#define | SDFM_SYNC_PWM22_SOCB (45) |
SDFM sync source is PWM23 SOCB. More... | |
#define | SDFM_SYNC_PWM23_SOCA (46) |
SDFM sync source is PWM24 SOCA. More... | |
#define | SDFM_SYNC_PWM23_SOCB (47) |
SDFM sync source is PWM24 SOCB. More... | |
#define | SDFM_SYNC_PWM24_SOCA (48) |
SDFM sync source is PWM25 SOCA. More... | |
#define | SDFM_SYNC_PWM24_SOCB (49) |
SDFM sync source is PWM25 SOCB. More... | |
#define | SDFM_SYNC_PWM25_SOCA (50) |
SDFM sync source is PWM26 SOCA. More... | |
#define | SDFM_SYNC_PWM25_SOCB (51) |
SDFM sync source is PWM26 SOCB. More... | |
#define | SDFM_SYNC_PWM26_SOCA (52) |
SDFM sync source is PWM27 SOCA. More... | |
#define | SDFM_SYNC_PWM26_SOCB (53) |
SDFM sync source is PWM27 SOCB. More... | |
#define | SDFM_SYNC_PWM27_SOCA (54) |
SDFM sync source is PWM28 SOCA. More... | |
#define | SDFM_SYNC_PWM27_SOCB (55) |
SDFM sync source is PWM28 SOCB. More... | |
#define | SDFM_SYNC_PWM28_SOCA (56) |
SDFM sync source is PWM29 SOCA. More... | |
#define | SDFM_SYNC_PWM28_SOCB (57) |
SDFM sync source is PWM29 SOCB. More... | |
#define | SDFM_SYNC_PWM29_SOCA (58) |
SDFM sync source is PWM30 SOCA. More... | |
#define | SDFM_SYNC_PWM29_SOCB (59) |
SDFM sync source is PWM30 SOCB. More... | |
#define | SDFM_SYNC_PWM30_SOCA (60) |
SDFM sync source is PWM31 SOCA. More... | |
#define | SDFM_SYNC_PWM30_SOCB (61) |
SDFM sync source is PWM31 SOCB. More... | |
#define | SDFM_SYNC_PWM31_SOCA (62) |
SDFM sync source is PWM32 SOCA. More... | |
#define | SDFM_SYNC_PWM31_SOCB (63) |
SDFM sync source is PWM32 SOCB. More... | |
#define | SDFM_FIFO_NOT_CLEARED_ON_SYNC (0) |
SDFM FIFO buffer is not cleared on Sync signal. More... | |
#define | SDFM_FIFO_CLEARED_ON_SYNC (1) |
SDFM FIFO buffer is cleared on Sync signal. More... | |
#define | SDFM_MANUAL_CLEAR_WAIT_FOR_SYNC (0) |
Wait for sync cleared using software. More... | |
#define | SDFM_AUTO_CLEAR_WAIT_FOR_SYNC (1) |
Wait for sync cleared automatically. More... | |
#define | SDFM_COMP_EVENT_1 CSL_SDFM_SDCPARM1_CEVT1SEL_SHIFT |
Selects CEVT1. More... | |
#define | SDFM_COMP_EVENT_2 CSL_SDFM_SDCPARM1_CEVT2SEL_SHIFT |
Selects CEVT2. More... | |
#define | SDFM_COMP_EVENT_SRC_COMPH1 (0) |
< COMPH1 event is the source More... | |
#define | SDFM_COMP_EVENT_SRC_COMPH1_L1 (1) |
COMPH2 event is the source. More... | |
#define | SDFM_COMP_EVENT_SRC_COMPH2 (2) |
Either of COMPH2 or COMPL2 event can be the source. More... | |
#define | SDFM_COMP_EVENT_SRC_COMPH2_L2 (3) |
COMPL1 event is the source. More... | |
#define | SDFM_COMP_EVENT_SRC_COMPL1 (0) |
COMPL2 event is the source. More... | |
#define | SDFM_COMP_EVENT_SRC_COMPL2 (2) |
#define | SDFM_CLK_SOURCE_CHANNEL_CLK (0x0) |
Source is respective channel clock. More... | |
#define | SDFM_CLK_SOURCE_SD1_CLK CSL_SDFM_SDCTLPARM1_SDCLKSEL_MASK |
Source is SD1 channel clock is the source. More... | |
#define | SDFM_COMPHOUT_SOURCE_COMPHIN (0x0) |
Comparator event high source is unfiltered event. More... | |
#define | SDFM_COMPHOUT_SOURCE_FILTER (0x8) |
Comparator event high source is filtered event. More... | |
#define | SDFM_COMPLOUT_SOURCE_COMPLIN (0x000) |
Comparator event low source is unfiltered event. More... | |
#define | SDFM_COMPLOUT_SOURCE_FILTER (0x800) |
Comparator event low source is filtered event. More... | |
#define | SDFM_MODULATOR_FAILURE_INTERRUPT (0x200U) |
Interrupt is generated if Modulator fails. More... | |
#define | SDFM_CEVT2_INTERRUPT (0x40U) |
Interrupt on CEVT2 (Comparator Event 2). More... | |
#define | SDFM_CEVT1_INTERRUPT (0x20U) |
Interrupt on CEVT1 (Comparator Event 1). More... | |
#define | SDFM_DATA_FILTER_ACKNOWLEDGE_INTERRUPT (0x1U) |
Interrupt on Acknowledge flag. More... | |
#define | SDFM_FIFO_INTERRUPT (0x1000U) |
Interrupt on FIFO level. More... | |
#define | SDFM_FIFO_OVERFLOW_INTERRUPT (0x8000U) |
Interrupt on FIFO overflow. More... | |
#define | SDFM_MAIN_INTERRUPT_FLAG (0x80000000U) |
Main interrupt flag. More... | |
#define | SDFM_FILTER_1_HIGH_THRESHOLD_FLAG (0x1U) |
Filter 1 high -level threshold flag. More... | |
#define | SDFM_FILTER_1_LOW_THRESHOLD_FLAG (0x2U) |
Filter 1 low -level threshold flag. More... | |
#define | SDFM_FILTER_2_HIGH_THRESHOLD_FLAG (0x4U) |
Filter 2 high -level threshold flag. More... | |
#define | SDFM_FILTER_2_LOW_THRESHOLD_FLAG (0x8U) |
Filter 2 low -level threshold flag. More... | |
#define | SDFM_FILTER_3_HIGH_THRESHOLD_FLAG (0x10U) |
Filter 3 high -level threshold flag. More... | |
#define | SDFM_FILTER_3_LOW_THRESHOLD_FLAG (0x20U) |
Filter 3 low -level threshold flag. More... | |
#define | SDFM_FILTER_4_HIGH_THRESHOLD_FLAG (0x40U) |
Filter 4 high -level threshold flag. More... | |
#define | SDFM_FILTER_4_LOW_THRESHOLD_FLAG (0x80U) |
Filter 4 low -level threshold flag. More... | |
#define | SDFM_FILTER_1_MOD_FAILED_FLAG (0x100U) |
Filter 1 modulator failed flag. More... | |
#define | SDFM_FILTER_2_MOD_FAILED_FLAG (0x200U) |
Filter 2 modulator failed flag. More... | |
#define | SDFM_FILTER_3_MOD_FAILED_FLAG (0x400U) |
Filter 3 modulator failed flag. More... | |
#define | SDFM_FILTER_4_MOD_FAILED_FLAG (0x800U) |
Filter 4 modulator failed flag. More... | |
#define | SDFM_FILTER_1_NEW_DATA_FLAG (0x1000U) |
Filter 1 new data flag. More... | |
#define | SDFM_FILTER_2_NEW_DATA_FLAG (0x2000U) |
Filter 2 new data flag. More... | |
#define | SDFM_FILTER_3_NEW_DATA_FLAG (0x4000U) |
Filter 3 new data flag. More... | |
#define | SDFM_FILTER_4_NEW_DATA_FLAG (0x8000U) |
Filter 4 new data flag. More... | |
#define | SDFM_FILTER_1_FIFO_OVERFLOW_FLAG (0x10000U) |
Filter 1 FIFO overflow flag. More... | |
#define | SDFM_FILTER_2_FIFO_OVERFLOW_FLAG (0x20000U) |
Filter 2 FIFO overflow flag. More... | |
#define | SDFM_FILTER_3_FIFO_OVERFLOW_FLAG (0x40000U) |
Filter 3 FIFO overflow flag. More... | |
#define | SDFM_FILTER_4_FIFO_OVERFLOW_FLAG (0x80000U) |
Filter 4 FIFO overflow flag. More... | |
#define | SDFM_FILTER_1_FIFO_INTERRUPT_FLAG (0x100000U) |
Filter 1 FIFO overflow flag. More... | |
#define | SDFM_FILTER_2_FIFO_INTERRUPT_FLAG (0x200000U) |
Filter 2 FIFO overflow flag. More... | |
#define | SDFM_FILTER_3_FIFO_INTERRUPT_FLAG (0x400000U) |
Filter 3 FIFO overflow flag. More... | |
#define | SDFM_FILTER_4_FIFO_INTERRUPT_FLAG (0x800000U) |
Filter 4 FIFO overflow flag. More... | |
#define SDFM_GET_LOW_THRESHOLD | ( | C | ) | ((uint16_t)(C)) |
Header Files.
Macro to get the low threshold
#define SDFM_GET_HIGH_THRESHOLD | ( | C | ) | ((uint16_t)((uint32_t)(C) >> 16U)) |
Macro to get the high threshold.
#define SDFM_GET_LOW_THRESHOLD_BOTH | ( | C1, | |
C2 | |||
) |
Macro to get the high threshold 1 & 2 to be passed as lowThreshold parameter to SDFM_setCompFilterLowThreshold().
#define SDFM_GET_HIGH_THRESHOLD_BOTH | ( | C1, | |
C2 | |||
) |
Macro to get the high threshold 1 & 2 to be passed as highThreshold parameter to SDFM_setCompFilterHighThreshold().
#define SDFM_SET_OSR | ( | X | ) | (((X) - 1) << 8U) |
Macro to convert comparator over sampling ratio to acceptable bit location.
#define SDFM_SHIFT_VALUE | ( | X | ) | ((X) << 2U) |
Macro to convert the data shift bit values to acceptable bit location.
#define SDFM_THRESHOLD | ( | H, | |
L | |||
) | ((((uint32_t)(H)) << 16U) | (L)) |
Macro to combine high threshold and low threshold values.
#define SDFM_SET_FIFO_LEVEL | ( | X | ) | ((X) << 7U) |
Macro to set the FIFO level to acceptable bit location.
#define SDFM_SET_ZERO_CROSS_THRESH_VALUE | ( | X | ) | (0x8000 | (X)) |
Macro to set and enable the zero cross threshold value.
#define SDFM_FILTER_DISABLE (0x0U) |
Macros to enable or disable filter.
#define SDFM_FILTER_ENABLE (0x2U) |
#define SDFM_SDFIL_OFFSET (CSL_SDFM_SDCTLPARM2 - CSL_SDFM_SDCTLPARM1) |
< SD filter offset
Event Digital filter offset
#define SDFM_DIGFIL_OFFSET (CSL_SDFM_SDCOMP2CTL - CSL_SDFM_SDCOMP1CTL) |
Offset between high threshold 1 & 2 registers.
#define SDFM_SDFLT1CMPHx_OFFSET (CSL_SDFM_SDFLT1CMPH2 - CSL_SDFM_SDFLT1CMPH1) |
Offset between low threshold 1 & 2 registers.
#define SDFM_SDFLT1CMPLx_OFFSET (CSL_SDFM_SDFLT1CMPL2 - CSL_SDFM_SDFLT1CMPL1) |
#define SDFM_COMPEVT_FILTER_CONFIG_M |
#define SDFM_COMPEVT_FILTER_LOCK_M |
#define SDFM_CLOCK_SYNCHRONIZER CSL_SDFM_SDCTLPARM1_SDCLKSYNC_MASK |
Define for Clock synchronizer Configuration.
#define SDFM_DATA_SYNCHRONIZER CSL_SDFM_SDCTLPARM1_SDDATASYNC_MASK |
Define for Data Synchronizer Configuration.
#define SDFM_OUTPUT_WITHIN_THRESHOLD (0) |
Values that can be returned from SDFM_getThresholdStatus()
SDFM output is within threshold
#define SDFM_OUTPUT_ABOVE_THRESHOLD (1) |
SDFM output is above threshold.
#define SDFM_OUTPUT_BELOW_THRESHOLD (2) |
SDFM output is below threshold.
#define SDFM_FILTER_1 (0) |
Digital filter 1.
Values that can be passed to all functions as the filterNumber parameter.
#define SDFM_FILTER_2 (1) |
Digital filter 2.
#define SDFM_FILTER_3 (2) |
Digital filter 3.
#define SDFM_FILTER_4 (3) |
Digital filter 4.
#define SDFM_FILTER_SINC_FAST (0x00) |
Digital filter with SincFast structure.
Values that can be passed to SDFM_setFilterType(), SDFM_setComparatorFilterType() as the filterType parameter.
#define SDFM_FILTER_SINC_1 (0x10) |
Digital filter with Sinc1 structure.
#define SDFM_FILTER_SINC_2 (0x20) |
Digital filter with Sinc3 structure.
#define SDFM_FILTER_SINC_3 (0x30) |
Digital filter with Sinc4 structure.
#define SDFM_MODULATOR_CLK_EQUAL_DATA_RATE (0) |
Modulator clock is identical to the data rate.
Values that can be passed to SDFM_setupModulatorClock(),as the clockMode parameter.
#define SDFM_DATA_FORMAT_16_BIT (0) |
Filter output is in 16 bits 2's complement format.
Values that can be passed to SDFM_setOutputDataFormat(),as the dataFormat parameter.
#define SDFM_DATA_FORMAT_32_BIT (1) |
Filter output is in 32 bits 2's complement format.
#define SDFM_DATA_READY_SOURCE_DIRECT (0) |
Data ready interrupt source is direct (non -FIFO).
Values that can be passed to SDFM_setDataReadyInterruptSource(),as the dataReadySource parameter.
#define SDFM_DATA_READY_SOURCE_FIFO (1) |
Data ready interrupt source is FIFO.
#define SDFM_SYNC_PWM0_SOCA (0) |
SDFM sync source is PWM1 SOCA.
Values that can be passed to SDFM_setPWMSyncSource(),as the syncSource parameter.
#define SDFM_SYNC_PWM0_SOCB (1) |
SDFM sync source is PWM1 SOCB.
#define SDFM_SYNC_PWM1_SOCA (2) |
SDFM sync source is PWM2 SOCA.
#define SDFM_SYNC_PWM1_SOCB (3) |
SDFM sync source is PWM2 SOCB.
#define SDFM_SYNC_PWM2_SOCA (4) |
SDFM sync source is PWM3 SOCA.
#define SDFM_SYNC_PWM2_SOCB (5) |
SDFM sync source is PWM3 SOCB.
#define SDFM_SYNC_PWM3_SOCA (6) |
SDFM sync source is PWM4 SOCA.
#define SDFM_SYNC_PWM3_SOCB (7) |
SDFM sync source is PWM4 SOCB.
#define SDFM_SYNC_PWM4_SOCA (8) |
SDFM sync source is PWM5 SOCA.
#define SDFM_SYNC_PWM4_SOCB (9) |
SDFM sync source is PWM5 SOCB.
#define SDFM_SYNC_PWM5_SOCA (10) |
SDFM sync source is PWM6 SOCA.
#define SDFM_SYNC_PWM5_SOCB (11) |
SDFM sync source is PWM6 SOCB.
#define SDFM_SYNC_PWM6_SOCA (12) |
SDFM sync source is PWM7 SOCA.
#define SDFM_SYNC_PWM6_SOCB (13) |
SDFM sync source is PWM7 SOCB.
#define SDFM_SYNC_PWM7_SOCA (14) |
SDFM sync source is PWM8 SOCA.
#define SDFM_SYNC_PWM7_SOCB (15) |
SDFM sync source is PWM8 SOCB.
#define SDFM_SYNC_PWM8_SOCA (16) |
SDFM sync source is PWM9 SOCA.
#define SDFM_SYNC_PWM8_SOCB (17) |
SDFM sync source is PWM9 SOCB.
#define SDFM_SYNC_PWM9_SOCA (18) |
SDFM sync source is PWM10 SOCA.
#define SDFM_SYNC_PWM9_SOCB (19) |
SDFM sync source is PWM10 SOCB.
#define SDFM_SYNC_PWM10_SOCA (20) |
SDFM sync source is PWM11 SOCA.
#define SDFM_SYNC_PWM10_SOCB (21) |
SDFM sync source is PWM11 SOCB.
#define SDFM_SYNC_PWM11_SOCA (22) |
SDFM sync source is PWM12 SOCA.
#define SDFM_SYNC_PWM11_SOCB (23) |
SDFM sync source is PWM12 SOCB.
#define SDFM_SYNC_PWM12_SOCA (24) |
SDFM sync source is PWM13 SOCA.
#define SDFM_SYNC_PWM12_SOCB (25) |
SDFM sync source is PWM13 SOCB.
#define SDFM_SYNC_PWM13_SOCA (26) |
SDFM sync source is PWM14 SOCA.
#define SDFM_SYNC_PWM13_SOCB (27) |
SDFM sync source is PWM14 SOCB.
#define SDFM_SYNC_PWM14_SOCA (28) |
SDFM sync source is PWM15 SOCA.
#define SDFM_SYNC_PWM14_SOCB (29) |
SDFM sync source is PWM15 SOCB.
#define SDFM_SYNC_PWM15_SOCA (30) |
SDFM sync source is PWM16 SOCA.
#define SDFM_SYNC_PWM15_SOCB (31) |
SDFM sync source is PWM16 SOCB.
#define SDFM_SYNC_PWM16_SOCA (32) |
SDFM sync source is PWM17 SOCA.
#define SDFM_SYNC_PWM16_SOCB (33) |
SDFM sync source is PWM17 SOCB.
#define SDFM_SYNC_PWM17_SOCA (34) |
SDFM sync source is PWM18 SOCA.
#define SDFM_SYNC_PWM17_SOCB (35) |
SDFM sync source is PWM18 SOCB.
#define SDFM_SYNC_PWM18_SOCA (36) |
SDFM sync source is PWM19 SOCA.
#define SDFM_SYNC_PWM18_SOCB (37) |
SDFM sync source is PWM19 SOCB.
#define SDFM_SYNC_PWM19_SOCA (38) |
SDFM sync source is PWM20 SOCA.
#define SDFM_SYNC_PWM19_SOCB (39) |
SDFM sync source is PWM20 SOCB.
#define SDFM_SYNC_PWM20_SOCA (40) |
SDFM sync source is PWM21 SOCA.
#define SDFM_SYNC_PWM20_SOCB (41) |
SDFM sync source is PWM21 SOCB.
#define SDFM_SYNC_PWM21_SOCA (42) |
SDFM sync source is PWM22 SOCA.
#define SDFM_SYNC_PWM21_SOCB (43) |
SDFM sync source is PWM22 SOCB.
#define SDFM_SYNC_PWM22_SOCA (44) |
SDFM sync source is PWM23 SOCA.
#define SDFM_SYNC_PWM22_SOCB (45) |
SDFM sync source is PWM23 SOCB.
#define SDFM_SYNC_PWM23_SOCA (46) |
SDFM sync source is PWM24 SOCA.
#define SDFM_SYNC_PWM23_SOCB (47) |
SDFM sync source is PWM24 SOCB.
#define SDFM_SYNC_PWM24_SOCA (48) |
SDFM sync source is PWM25 SOCA.
#define SDFM_SYNC_PWM24_SOCB (49) |
SDFM sync source is PWM25 SOCB.
#define SDFM_SYNC_PWM25_SOCA (50) |
SDFM sync source is PWM26 SOCA.
#define SDFM_SYNC_PWM25_SOCB (51) |
SDFM sync source is PWM26 SOCB.
#define SDFM_SYNC_PWM26_SOCA (52) |
SDFM sync source is PWM27 SOCA.
#define SDFM_SYNC_PWM26_SOCB (53) |
SDFM sync source is PWM27 SOCB.
#define SDFM_SYNC_PWM27_SOCA (54) |
SDFM sync source is PWM28 SOCA.
#define SDFM_SYNC_PWM27_SOCB (55) |
SDFM sync source is PWM28 SOCB.
#define SDFM_SYNC_PWM28_SOCA (56) |
SDFM sync source is PWM29 SOCA.
#define SDFM_SYNC_PWM28_SOCB (57) |
SDFM sync source is PWM29 SOCB.
#define SDFM_SYNC_PWM29_SOCA (58) |
SDFM sync source is PWM30 SOCA.
#define SDFM_SYNC_PWM29_SOCB (59) |
SDFM sync source is PWM30 SOCB.
#define SDFM_SYNC_PWM30_SOCA (60) |
SDFM sync source is PWM31 SOCA.
#define SDFM_SYNC_PWM30_SOCB (61) |
SDFM sync source is PWM31 SOCB.
#define SDFM_SYNC_PWM31_SOCA (62) |
SDFM sync source is PWM32 SOCA.
#define SDFM_SYNC_PWM31_SOCB (63) |
SDFM sync source is PWM32 SOCB.
#define SDFM_FIFO_NOT_CLEARED_ON_SYNC (0) |
SDFM FIFO buffer is not cleared on Sync signal.
Values that can be passed to SDFM_setFIFOClearOnSyncMode(),as the fifoClearSyncMode parameter.
#define SDFM_FIFO_CLEARED_ON_SYNC (1) |
SDFM FIFO buffer is cleared on Sync signal.
#define SDFM_MANUAL_CLEAR_WAIT_FOR_SYNC (0) |
Wait for sync cleared using software.
Values that can be passed to SDFM_setWaitForSyncClearMode(),as the syncClearMode parameter.
#define SDFM_AUTO_CLEAR_WAIT_FOR_SYNC (1) |
Wait for sync cleared automatically.
#define SDFM_COMP_EVENT_1 CSL_SDFM_SDCPARM1_CEVT1SEL_SHIFT |
Selects CEVT1.
Values that can be passed to SDFM_selectCompEventSource() as the compEventNum parameter.
#define SDFM_COMP_EVENT_2 CSL_SDFM_SDCPARM1_CEVT2SEL_SHIFT |
Selects CEVT2.
#define SDFM_COMP_EVENT_SRC_COMPH1 (0) |
< COMPH1 event is the source
Values that can be passed to SDFM_selectCompEventSource() as the compEventSource parameter. Either of COMPH1 or COMPL1 event can be the source
#define SDFM_COMP_EVENT_SRC_COMPH1_L1 (1) |
COMPH2 event is the source.
#define SDFM_COMP_EVENT_SRC_COMPH2 (2) |
Either of COMPH2 or COMPL2 event can be the source.
#define SDFM_COMP_EVENT_SRC_COMPH2_L2 (3) |
COMPL1 event is the source.
#define SDFM_COMP_EVENT_SRC_COMPL1 (0) |
COMPL2 event is the source.
#define SDFM_COMP_EVENT_SRC_COMPL2 (2) |
#define SDFM_CLK_SOURCE_CHANNEL_CLK (0x0) |
Source is respective channel clock.
Values that can be passed to SDFM_selectClockSource() as the clkSource parameter.
#define SDFM_CLK_SOURCE_SD1_CLK CSL_SDFM_SDCTLPARM1_SDCLKSEL_MASK |
Source is SD1 channel clock is the source.
#define SDFM_COMPHOUT_SOURCE_COMPHIN (0x0) |
Comparator event high source is unfiltered event.
Values that can be passed to SDFM_selectCompEventHighSource() as the source parameter.
#define SDFM_COMPHOUT_SOURCE_FILTER (0x8) |
Comparator event high source is filtered event.
#define SDFM_COMPLOUT_SOURCE_COMPLIN (0x000) |
Comparator event low source is unfiltered event.
Values that can be passed to SDFM_selectCompEventLowSource() as the source parameter.
#define SDFM_COMPLOUT_SOURCE_FILTER (0x800) |
Comparator event low source is filtered event.
#define SDFM_MODULATOR_FAILURE_INTERRUPT (0x200U) |
Interrupt is generated if Modulator fails.
#define SDFM_CEVT2_INTERRUPT (0x40U) |
Interrupt on CEVT2 (Comparator Event 2).
#define SDFM_CEVT1_INTERRUPT (0x20U) |
Interrupt on CEVT1 (Comparator Event 1).
#define SDFM_DATA_FILTER_ACKNOWLEDGE_INTERRUPT (0x1U) |
Interrupt on Acknowledge flag.
#define SDFM_FIFO_INTERRUPT (0x1000U) |
Interrupt on FIFO level.
#define SDFM_FIFO_OVERFLOW_INTERRUPT (0x8000U) |
Interrupt on FIFO overflow.
#define SDFM_MAIN_INTERRUPT_FLAG (0x80000000U) |
Main interrupt flag.
#define SDFM_FILTER_1_HIGH_THRESHOLD_FLAG (0x1U) |
Filter 1 high -level threshold flag.
#define SDFM_FILTER_1_LOW_THRESHOLD_FLAG (0x2U) |
Filter 1 low -level threshold flag.
#define SDFM_FILTER_2_HIGH_THRESHOLD_FLAG (0x4U) |
Filter 2 high -level threshold flag.
#define SDFM_FILTER_2_LOW_THRESHOLD_FLAG (0x8U) |
Filter 2 low -level threshold flag.
#define SDFM_FILTER_3_HIGH_THRESHOLD_FLAG (0x10U) |
Filter 3 high -level threshold flag.
#define SDFM_FILTER_3_LOW_THRESHOLD_FLAG (0x20U) |
Filter 3 low -level threshold flag.
#define SDFM_FILTER_4_HIGH_THRESHOLD_FLAG (0x40U) |
Filter 4 high -level threshold flag.
#define SDFM_FILTER_4_LOW_THRESHOLD_FLAG (0x80U) |
Filter 4 low -level threshold flag.
#define SDFM_FILTER_1_MOD_FAILED_FLAG (0x100U) |
Filter 1 modulator failed flag.
#define SDFM_FILTER_2_MOD_FAILED_FLAG (0x200U) |
Filter 2 modulator failed flag.
#define SDFM_FILTER_3_MOD_FAILED_FLAG (0x400U) |
Filter 3 modulator failed flag.
#define SDFM_FILTER_4_MOD_FAILED_FLAG (0x800U) |
Filter 4 modulator failed flag.
#define SDFM_FILTER_1_NEW_DATA_FLAG (0x1000U) |
Filter 1 new data flag.
#define SDFM_FILTER_2_NEW_DATA_FLAG (0x2000U) |
Filter 2 new data flag.
#define SDFM_FILTER_3_NEW_DATA_FLAG (0x4000U) |
Filter 3 new data flag.
#define SDFM_FILTER_4_NEW_DATA_FLAG (0x8000U) |
Filter 4 new data flag.
#define SDFM_FILTER_1_FIFO_OVERFLOW_FLAG (0x10000U) |
Filter 1 FIFO overflow flag.
#define SDFM_FILTER_2_FIFO_OVERFLOW_FLAG (0x20000U) |
Filter 2 FIFO overflow flag.
#define SDFM_FILTER_3_FIFO_OVERFLOW_FLAG (0x40000U) |
Filter 3 FIFO overflow flag.
#define SDFM_FILTER_4_FIFO_OVERFLOW_FLAG (0x80000U) |
Filter 4 FIFO overflow flag.
#define SDFM_FILTER_1_FIFO_INTERRUPT_FLAG (0x100000U) |
Filter 1 FIFO overflow flag.
#define SDFM_FILTER_2_FIFO_INTERRUPT_FLAG (0x200000U) |
Filter 2 FIFO overflow flag.
#define SDFM_FILTER_3_FIFO_INTERRUPT_FLAG (0x400000U) |
Filter 3 FIFO overflow flag.
#define SDFM_FILTER_4_FIFO_INTERRUPT_FLAG (0x800000U) |
Filter 4 FIFO overflow flag.
|
inlinestatic |
Enable external reset
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function enables data filter to be reset by an external source (PWM compare output).
|
inlinestatic |
Disable external reset
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function disables data filter from being reset by an external source (PWM compare output).
|
inlinestatic |
Enable filter
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function enables the filter specified by the filterNumber variable.
|
inlinestatic |
Disable filter
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function disables the filter specified by the filterNumber variable.
|
inlinestatic |
Enable FIFO buffer
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function enables the filter FIFO buffer specified by the filterNumber variable.
|
inlinestatic |
Disable FIFO buffer
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function disables the filter FIFO buffer specified by the filterNumber variable.
|
inlinestatic |
Return the Zero Cross Trip status
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function returns the Zero Cross Trip status for the filter specified by filterNumber variable.
|
inlinestatic |
Clear the Zero Cross Trip status
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function clears the Zero Cross Trip status for the filter specified by filterNumber variable.
|
inlinestatic |
Enable Comparator.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function enables the Comparator for the selected filter.
|
inlinestatic |
Disable Comparator.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function disables the Comparator for the selected filter.
|
inlinestatic |
Selects Comparator Event Source.
base | is the base address of the SDFM module |
filterNumber | is the filter number |
compEventNum | is the event number |
compEventSource | is the event source |
This function selects the comparator event source. Valid values for compEventNum are:
Valid values for SDFM_COMP_EVENT_2 are:
|
inlinestatic |
Set filter type.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
filterType | is the filter type or structure. |
This function sets the filter type or structure to be used as specified by filterType for the selected filter number as specified by filterNumber.
|
inlinestatic |
Set data filter over sampling ratio.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
overSamplingRatio | is the data filter over sampling ratio. |
This function sets the filter oversampling ratio for the filter specified by the filterNumber variable.Valid values for the variable overSamplingRatio are 0 to 255 inclusive. The actual oversampling ratio will be this value plus one.
|
inlinestatic |
Set modulator clock mode.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
clockMode | is the modulator clock mode. |
This function sets the modulator clock mode specified by clockMode for the filter specified by filterNumber.
|
inlinestatic |
Set the output data format
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
dataFormat | is the output data format. |
This function sets the output data format for the filter specified by filterNumber.
|
inlinestatic |
Set data shift value.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
shiftValue | is the data shift value. |
This function sets the shift value for the 16 bit 2's complement data format. The valid maximum value for shiftValue is 31.
Note: Use this function with 16 bit 2's complement data format only.
|
inlinestatic |
Set Filter output high-level threshold.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
highThreshold | is the high-level threshold 1 & 2. |
This function sets the unsigned high-level threshold value for the Comparator filter output. If the output value of the filter exceeds highThreshold and interrupt generation is enabled, an interrupt will be issued. The param highThreshold takes both high threshold 1 & 2 values. The upper 16-bits represent the high threshold 2 value while lower 16-bits represent the threshold 1 values.
|
inlinestatic |
Set Filter output low-level threshold.
base | is the base address of the SDFM module |
filterNumber | is the filter number |
lowThreshold | is the low-level threshold |
This function sets the unsigned low-level threshold value 1 or 2 for the Comparator filter output. If the output value of the filter gets below lowThreshold and interrupt generation is enabled, an interrupt will be issued. The param lowThreshold takes both low threshold 1 & 2 values. The upper 16-bits represent the low threshold 2 value while lower 16-bits represent the threshold 1 values.
|
inlinestatic |
Set Filter output zero-cross threshold.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
zeroCrossThreshold | is the zero-cross threshold. |
This function sets the unsigned zero-cross threshold value for the Comparator filter output.
|
inlinestatic |
Enable zero-cross Edge detect mode.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function enables Zero Cross Edge detection.
|
inlinestatic |
Disable zero-cross Edge detect mode.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function disables Zero Cross Edge detection.
|
inlinestatic |
Enable SDFM interrupts.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
intFlags | is the interrupt source. |
This function enables the low threshold , high threshold or modulator failure interrupt as determined by intFlags for the filter specified by filterNumber. Valid values for intFlags are: SDFM_MODULATOR_FAILURE_INTERRUPT , SDFM_CEVT2_INTERRUPT, SDFM_CEVT1_INTERRUPT, SDFM_FIFO_INTERRUPT, SDFM_FIFO_OVERFLOW_INTERRUPT,SDFM_DATA_FILTER_ACKNOWLEDGE_INTERRUPT
|
inlinestatic |
Disable SDFM interrupts.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
intFlags | is the interrupt source. |
This function disables the low threshold , high threshold or modulator failure interrupt as determined by intFlags for the filter specified by filterNumber. Valid values for intFlags are: SDFM_MODULATOR_FAILURE_INTERRUPT , SDFM_CEVT2_INTERRUPT, SDFM_CEVT1_INTERRUPT, SDFM_FIFO_INTERRUPT, SDFM_FIFO_OVERFLOW_INTERRUPT,SDFM_DATA_FILTER_ACKNOWLEDGE_INTERRUPT
|
inlinestatic |
Set the comparator filter type.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
filterType | is the comparator filter type or structure. |
This function sets the Comparator filter type or structure to be used as specified by filterType for the selected filter number as specified by filterNumber.
|
inlinestatic |
Set Comparator filter over sampling ratio.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
overSamplingRatio | is the comparator filter over sampling ration. |
This function sets the comparator filter oversampling ratio for the filter specified by the filterNumber.Valid values for the variable overSamplingRatio are 0 to 31 inclusive. The actual oversampling ratio will be this value plus one.
|
inlinestatic |
Get the filter data output.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function returns the latest data filter output. Depending on the filter data output format selected, the valid value will be the lower 16 bits or the whole 32 bits of the returned value.
|
inlinestatic |
Get the Comparator threshold status.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function returns the Comparator output threshold status for the given filterNumber.
|
inlinestatic |
Get the Modulator status.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function returns the Modulator status.
|
inlinestatic |
Check if new Filter data is available.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function returns new filter data status.
|
inlinestatic |
Check if FIFO buffer is overflowed.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function returns the status of the FIFO buffer overflow for the given filter value.
|
inlinestatic |
Check FIFO buffer interrupt status.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function returns the status of the FIFO buffer interrupt for the given filter.
|
inlinestatic |
Get pending interrupt.
base | is the base address of the SDFM module |
This function returns any pending interrupt status.
|
inlinestatic |
Clear pending flags.
base | is the base address of the SDFM module |
flag | is the SDFM status |
This function clears the specified pending interrupt flag. Valid values are SDFM_MAIN_INTERRUPT_FLAG,SDFM_FILTER_1_NEW_DATA_FLAG, SDFM_FILTER_2_NEW_DATA_FLAG,SDFM_FILTER_3_NEW_DATA_FLAG, SDFM_FILTER_4_NEW_DATA_FLAG,SDFM_FILTER_1_MOD_FAILED_FLAG, SDFM_FILTER_2_MOD_FAILED_FLAG,SDFM_FILTER_3_MOD_FAILED_FLAG, SDFM_FILTER_4_MOD_FAILED_FLAG,SDFM_FILTER_1_HIGH_THRESHOLD_FLAG, SDFM_FILTER_1_LOW_THRESHOLD_FLAG,SDFM_FILTER_2_HIGH_THRESHOLD_FLAG, SDFM_FILTER_2_LOW_THRESHOLD_FLAG,SDFM_FILTER_3_HIGH_THRESHOLD_FLAG, SDFM_FILTER_3_LOW_THRESHOLD_FLAG,SDFM_FILTER_4_HIGH_THRESHOLD_FLAG, SDFM_FILTER_4_LOW_THRESHOLD_FLAG,SDFM_FILTER_1_FIFO_OVERFLOW_FLAG, SDFM_FILTER_2_FIFO_OVERFLOW_FLAG,SDFM_FILTER_3_FIFO_OVERFLOW_FLAG SDFM_FILTER_4_FIFO_OVERFLOW_FLAG,SDFM_FILTER_1_FIFO_INTERRUPT_FLAG, SDFM_FILTER_2_FIFO_INTERRUPT_FLAG,SDFM_FILTER_3_FIFO_INTERRUPT_FLAG SDFM_FILTER_4_FIFO_INTERRUPT_FLAG or any combination of the above flags.
|
inlinestatic |
Enable main interrupt.
base | is the base address of the SDFM module |
This function enables the main SDFM interrupt.
|
inlinestatic |
Disable main interrupt.
base | is the base address of the SDFM module |
This function disables the main SDFM interrupt.
|
inlinestatic |
Enable main filter.
base | is the base address of the SDFM module |
This function enables main filter.
|
inlinestatic |
Disable main filter.
base | is the base address of the SDFM module |
This function disables main filter.
|
inlinestatic |
Return the FIFO data count
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function returns the FIFO data count.
|
inlinestatic |
Return the Comparator sinc filter data
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function returns the Comparator sinc filter data output.
|
inlinestatic |
Return the FIFO data
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function returns the latest FIFO data.
|
inlinestatic |
Set the FIFO interrupt level.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
fifoLevel | is the FIFO interrupt level. |
This function sets the FIFO interrupt level. Interrupt is generated when the FIFO buffer word count gets to or exceeds the value of fifoLevel. Maximum value for fifoLevel is 16.
|
inlinestatic |
Set data ready interrupt source.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
dataReadySource | is the data ready interrupt source. |
This function sets the data ready interrupt source. Valid values for dataReadySource:
|
inlinestatic |
Get the wait-for-sync event status.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function returns the Wait-for-Sync event status.
|
inlinestatic |
Clear the Wait-for-sync event status.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function clears the Wait-for-sync event status.
|
inlinestatic |
Enable wait for sync mode.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function enables the wait for sync mode. Data to FIFO will be written only after PWM sync event.
|
inlinestatic |
Disable wait for sync mode.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function disables the wait for sync mode. Data to FIFO will be written every Data ready event.
|
inlinestatic |
Set the PWM sync mode.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
syncSource | is the PWM sync source. |
This function sets the PWM sync source for the specific SDFM filter. Valid values for syncSource are SDFM_SYNC_PWMx_CMPy. Where x ranges from 1 to 8 Representing PWM1 to PWM8 respectively and y ranges from A to D representing PWM comparators A to D.
|
inlinestatic |
Set FIFO clear on sync mode.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
fifoClearSyncMode | is the FIFO clear on sync mode. |
This function sets the FIFO clear mode for the specified filter when a sync happens depending on the value of fifoClearSyncMode. Valid values for fifoClearSyncMode are:
|
inlinestatic |
Set Wait-for-sync clear mode.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
syncClearMode | is the wait-for-sync clear mode. |
This function sets the Wait-For-sync clear mode depending on the value of syncClearMode. Valid values for syncClearMode are:
|
inlinestatic |
Selects clock source for SDFM channels.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
clkSource | is the clock source |
This function selects the clock for SDFM module filter channels. Valid values for clkSource are:
|
inlinestatic |
Enables Input Synchronizer.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
syncConfig | defines which synchronizer to be enabled |
This function enables either data or clock or both synchronizer. Valid values for syncConfig can be the logical OR of any of the values:
|
inlinestatic |
Disables Input Synchronizer.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
syncConfig | defines which synchronizer to be disabled |
This function disables either data or clock or both synchronizer. Valid values for syncConfig can be the logical OR of any of the values:
|
inlinestatic |
Selects comparator event high source.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
source | is the comparator event high source |
This function selects the source for comparator event high. Valid values for source are:
|
inlinestatic |
Selects comparator event low source.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
source | is the comparator event low source |
This function selects the source for comparator event low. Valid values for source are:
|
inlinestatic |
Initializes Comparator Event Low Filter.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function initializes Comparator Event Low Filter.
|
inlinestatic |
Initializes Comparator Event High Filter.
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
This function initializes Comparator Event High Filter.
|
inlinestatic |
Lock Comparator Event Filter Configurations
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
lockConfig | defines the configurations to be locked |
This function locks the comparator event filter configurations. Valid values of the lockConfig can be logical OR of any of the following values:
void SDFM_configComparator | ( | uint32_t | base, |
uint16_t | config1, | ||
uint32_t | config2, | ||
uint16_t | config3 | ||
) |
Configures SDFM comparator for filter config & threshold values
base | is the base address of the SDFM module |
config1 | is the filter number, filter type and over sampling ratio. |
config2 | is high-level and low-level threshold 1 values. |
config3 | is the zero-cross threshold value. |
This function configures the comparator filter for filter config and threshold values based on provided inputs.
The config1 parameter is the logical OR of the filter number, filter type and oversampling ratio. The bit definitions for config1 are as follow:
The config2 parameter is the logical OR of the filter high and low threshold 1 values. The bit definitions for config2 are as follow:
void SDFM_configEnhancedComparator | ( | uint32_t | base, |
uint16_t | filterConfig, | ||
uint32_t | highLowThreshold1, | ||
uint32_t | highLowThreshold2, | ||
uint16_t | zeroCrossThreshold | ||
) |
Configure SDFM enhanced comparator for filter config & threshold values
base | is the base address of the SDFM module |
filterConfig | is the filter number, filter type & over sampling ratio. |
highLowThreshold1 | is high-level and low-level threshold 1 values. |
highLowThreshold2 | is high-level and low-level threshold 2 values. |
zeroCrossThreshold | is the zero-cross threshold value. |
This function configures the comparator filter for filter config and threshold values based on input parameters.
The filterConfig parameter is the logical OR of the filter number, filter type and oversampling ratio. The bit definitions for filterConfig are as follow:
The highLowThreshold1 parameter is the logical OR of the filter high & low threshold 1 values. The bit definitions for highLowThreshold1 are as follow:
The highLowThreshold2 parameter is the logical OR of the filter high & low threshold 2 values. The bit definitions for highLowThreshold2 are as follow:
The zeroCrossThreshold parameter is the logical OR of the zero cross threshold enable flag and the zero-cross threshold value. The bit definitions for zeroCrossThreshold are as follows:
void SDFM_configDataFilter | ( | uint32_t | base, |
uint16_t | config1, | ||
uint16_t | config2 | ||
) |
Configure SDFM data filter
base | is the base address of the SDFM module |
config1 | is the filter number, filter type and over sampling ratio configuration. |
config2 | is filter switch, data representation and data shift values configuration. |
This function configures the data filter based on configurations config1 and config2.
The config1 parameter is the logical OR of the filter number, filter type and oversampling ratio. The bit definitions for config1 are as follow:
The config2 parameter is the logical OR of data representation, filter switch, and data shift values The bit definitions for config2 are as follow:
void SDFM_configZeroCrossComparator | ( | uint32_t | base, |
uint16_t | config1, | ||
uint16_t | config2 | ||
) |
Configure SDFM comparator Zero Cross threshold
base | is the base address of the SDFM module |
config1 | is the filter number, filter type and over sampling ratio. |
config2 | is the zero cross threshold value. |
This function configures the comparator filter zero cross threshold values based on configurations config1 and config2.
The config1 parameter is the logical OR of the filter number, filter type and oversampling ratio. The bit definitions for config1 are as follow:
The config2 parameter is the value of the zero cross threshold. The maximum acceptable value is 32767.
void SDFM_configDataFilterFIFO | ( | uint32_t | base, |
uint16_t | config1, | ||
uint16_t | config2 | ||
) |
Configure SDFM data filter FIFO
base | is the base address of the SDFM module |
config1 | is the filter number, filter type and over sampling ratio configuration. |
config2 | is filter switch, data representation and data shift values and FIFO level configuration. |
This function enables and configures the data filter FIFO based on configurations config1 and config2.
The config1 parameter is the logical OR of the filter number, filter type and oversampling ratio. The bit definitions for config1 are as follow:
The config2 parameter is the logical OR of data representation, filter switch, data shift value, and FIFO level The bit definitions for config2 are as follow:
void SDFM_configCompEventLowFilter | ( | uint32_t | base, |
uint32_t | filterNumber, | ||
const SDFM_CompEventFilterConfig * | config | ||
) |
Configure Comparator Event Low Filter
base | is the base address of the SDFM module |
filterNumber | is the filter number. |
config | is the comparator event low source |
This function configures the sample window, threshold and clock prescale configurations for the comparator event low filter.
void SDFM_configCompEventHighFilter | ( | uint32_t | base, |
uint32_t | filterNumber, | ||
const SDFM_CompEventFilterConfig * | config | ||
) |
Configure Comparator Event High Filter
base | is the base address of the SDFM module. |
filterNumber | is the filter number. |
config | is the comparator event high source |
This function configures the sample window, threshold and clock prescale configurations for the comparator event high filter.