AM263x MCU+ SDK  08.02.00

Introduction

This module contains APIs to program and use the ECAP module.

Functions

static void ECAP_setEventPrescaler (uint32_t base, uint16_t preScalerValue)
 
static void ECAP_setEventPolarity (uint32_t base, ECAP_Events event, ECAP_EventPolarity polarity)
 
static void ECAP_setCaptureMode (uint32_t base, ECAP_CaptureMode mode, ECAP_Events event)
 
static void ECAP_reArm (uint32_t base)
 
static void ECAP_enableInterrupt (uint32_t base, uint16_t intFlags)
 
static void ECAP_disableInterrupt (uint32_t base, uint16_t intFlags)
 
static uint16_t ECAP_getInterruptSource (uint32_t base)
 
static bool ECAP_getGlobalInterruptStatus (uint32_t base)
 
static void ECAP_clearInterrupt (uint32_t base, uint16_t intFlags)
 
static void ECAP_clearGlobalInterrupt (uint32_t base)
 
static void ECAP_forceInterrupt (uint32_t base, uint16_t intFlags)
 
static void ECAP_enableCaptureMode (uint32_t base)
 
static void ECAP_enableAPWMMode (uint32_t base)
 
static void ECAP_enableCounterResetOnEvent (uint32_t base, ECAP_Events event)
 
static void ECAP_disableCounterResetOnEvent (uint32_t base, ECAP_Events event)
 
static void ECAP_enableTimeStampCapture (uint32_t base)
 
static void ECAP_disableTimeStampCapture (uint32_t base)
 
static void ECAP_setPhaseShiftCount (uint32_t base, uint32_t shiftCount)
 
static void ECAP_setSyncInPulseSource (uint32_t base, ECAP_SyncInPulseSource source)
 
static void ECAP_enableLoadCounter (uint32_t base)
 
static void ECAP_disableLoadCounter (uint32_t base)
 
static void ECAP_loadCounter (uint32_t base)
 
static void ECAP_setSyncOutMode (uint32_t base, ECAP_SyncOutMode mode)
 
static void ECAP_stopCounter (uint32_t base)
 
static void ECAP_startCounter (uint32_t base)
 
static void ECAP_setAPWMPolarity (uint32_t base, ECAP_APWMPolarity polarity)
 
static void ECAP_setAPWMPeriod (uint32_t base, uint32_t periodCount)
 
static void ECAP_setAPWMCompare (uint32_t base, uint32_t compareCount)
 
static void ECAP_setAPWMShadowPeriod (uint32_t base, uint32_t periodCount)
 
static void ECAP_setAPWMShadowCompare (uint32_t base, uint32_t compareCount)
 
static uint32_t ECAP_getTimeBaseCounter (uint32_t base)
 
static uint32_t ECAP_getEventTimeStamp (uint32_t base, ECAP_Events event)
 
static void ECAP_selectECAPInput (uint32_t base, ECAP_InputCaptureSignals input)
 
static void ECAP_resetCounters (uint32_t base)
 
static void ECAP_setDMASource (uint32_t base, ECAP_Events event)
 
static ECAP_Events ECAP_getModuloCounterStatus (uint32_t base)
 
static void HRCAP_enableHighResolution (uint32_t base)
 
static void HRCAP_disableHighResolution (uint32_t base)
 
static void HRCAP_enableHighResolutionClock (uint32_t base)
 
static void HRCAP_disbleHighResolutionClock (uint32_t base)
 
static void HRCAP_startCalibration (uint32_t base)
 
static void HRCAP_setCalibrationMode (uint32_t base)
 
static void HRCAP_enableCalibrationInterrupt (uint32_t base, uint16_t intFlags)
 
static void HRCAP_disableCalibrationInterrupt (uint32_t base, uint16_t intFlags)
 
static uint16_t HRCAP_getCalibrationFlags (uint32_t base)
 
static void HRCAP_clearCalibrationFlags (uint32_t base, uint16_t flags)
 
static bool HRCAP_isCalibrationBusy (uint32_t base)
 
static void HRCAP_forceCalibrationFlags (uint32_t base, uint16_t flag)
 
static void HRCAP_setCalibrationPeriod (uint32_t base, uint32_t sysclkHz)
 
static uint32_t HRCAP_getCalibrationClockPeriod (uint32_t base, HRCAP_CalibrationClockSource clockSource)
 
static Float32 HRCAP_getScaleFactor (uint32_t base)
 
static Float32 HRCAP_convertEventTimeStampNanoseconds (uint32_t timeStamp, Float32 scaleFactor)
 
void ECAP_setEmulationMode (uint32_t base, ECAP_EmulationMode mode)
 

Enumerations

enum  ECAP_EmulationMode { ECAP_EMULATION_STOP = 0x0U, ECAP_EMULATION_RUN_TO_ZERO = 0x1U, ECAP_EMULATION_FREE_RUN = 0x2U }
 
enum  ECAP_CaptureMode { ECAP_CONTINUOUS_CAPTURE_MODE = 0U, ECAP_ONE_SHOT_CAPTURE_MODE = 1U }
 
enum  ECAP_Events { ECAP_EVENT_1 = 0U, ECAP_EVENT_2 = 1U, ECAP_EVENT_3 = 2U, ECAP_EVENT_4 = 3U }
 
enum  ECAP_SyncOutMode { ECAP_SYNC_OUT_SYNCI = 0x00, ECAP_SYNC_OUT_COUNTER_PRD = 0x40, ECAP_SYNC_OUT_DISABLED = 0x80 }
 
enum  ECAP_APWMPolarity { ECAP_APWM_ACTIVE_HIGH = 0x000, ECAP_APWM_ACTIVE_LOW = 0x400 }
 
enum  ECAP_EventPolarity { ECAP_EVNT_RISING_EDGE = 0U, ECAP_EVNT_FALLING_EDGE = 1U }
 
enum  ECAP_InputCaptureSignals {
  ECAP_INPUT_FSI_RX0_TRIG_0 = 0, ECAP_INPUT_FSI_RX0_TRIG_1 = 1, ECAP_INPUT_FSI_RX0_TRIG_2 = 2, ECAP_INPUT_FSI_RX0_TRIG_3 = 3,
  ECAP_INPUT_FSI_RX1_TRIG_0 = 4, ECAP_INPUT_FSI_RX1_TRIG_1 = 5, ECAP_INPUT_FSI_RX1_TRIG_2 = 6, ECAP_INPUT_FSI_RX1_TRIG_3 = 7,
  ECAP_INPUT_FSI_RX2_TRIG_0 = 8, ECAP_INPUT_FSI_RX2_TRIG_1 = 9, ECAP_INPUT_FSI_RX2_TRIG_2 = 10, ECAP_INPUT_FSI_RX2_TRIG_3 = 11,
  ECAP_INPUT_FSI_RX3_TRIG_0 = 12, ECAP_INPUT_FSI_RX3_TRIG_1 = 13, ECAP_INPUT_FSI_RX3_TRIG_2 = 14, ECAP_INPUT_FSI_RX3_TRIG_3 = 15,
  ECAP_INPUT_EQEP0_QI = 16, ECAP_INPUT_EQEP0_QS = 17, ECAP_INPUT_EQEP1_QI = 18, ECAP_INPUT_EQEP1_QS = 19,
  ECAP_INPUT_EQEP2_QI = 20, ECAP_INPUT_EQEP2_QS = 21, ECAP_INPUT_EPWM0_SOCA = 54, ECAP_INPUT_EPWM1_SOCA = 55,
  ECAP_INPUT_EPWM2_SOCA = 56, ECAP_INPUT_EPWM3_SOCA = 57, ECAP_INPUT_EPWM4_SOCA = 58, ECAP_INPUT_EPWM5_SOCA = 59,
  ECAP_INPUT_EPWM6_SOCA = 60, ECAP_INPUT_EPWM7_SOCA = 61, ECAP_INPUT_EPWM8_SOCA = 62, ECAP_INPUT_EPWM9_SOCA = 63,
  ECAP_INPUT_EPWM10_SOCA = 64, ECAP_INPUT_EPWM11_SOCA = 65, ECAP_INPUT_EPWM12_SOCA = 66, ECAP_INPUT_EPWM13_SOCA = 67,
  ECAP_INPUT_EPWM14_SOCA = 68, ECAP_INPUT_EPWM15_SOCA = 69, ECAP_INPUT_EPWM16_SOCA = 70, ECAP_INPUT_EPWM17_SOCA = 71,
  ECAP_INPUT_EPWM18_SOCA = 72, ECAP_INPUT_EPWM19_SOCA = 73, ECAP_INPUT_EPWM20_SOCA = 74, ECAP_INPUT_EPWM21_SOCA = 75,
  ECAP_INPUT_EPWM22_SOCA = 76, ECAP_INPUT_EPWM23_SOCA = 77, ECAP_INPUT_EPWM24_SOCA = 78, ECAP_INPUT_EPWM25_SOCA = 79,
  ECAP_INPUT_EPWM26_SOCA = 80, ECAP_INPUT_EPWM27_SOCA = 81, ECAP_INPUT_EPWM28_SOCA = 82, ECAP_INPUT_EPWM29_SOCA = 83,
  ECAP_INPUT_EPWM30_SOCA = 84, ECAP_INPUT_EPWM31_SOCA = 85, ECAP_INPUT_EPWM0_SOCB = 86, ECAP_INPUT_EPWM1_SOCB = 87,
  ECAP_INPUT_EPWM2_SOCB = 88, ECAP_INPUT_EPWM3_SOCB = 89, ECAP_INPUT_EPWM4_SOCB = 90, ECAP_INPUT_EPWM5_SOCB = 91,
  ECAP_INPUT_EPWM6_SOCB = 92, ECAP_INPUT_EPWM7_SOCB = 93, ECAP_INPUT_EPWM8_SOCB = 94, ECAP_INPUT_EPWM9_SOCB = 95,
  ECAP_INPUT_EPWM10_SOCB = 96, ECAP_INPUT_EPWM11_SOCB = 97, ECAP_INPUT_EPWM12_SOCB = 98, ECAP_INPUT_EPWM13_SOCB = 99,
  ECAP_INPUT_EPWM14_SOCB = 100, ECAP_INPUT_EPWM15_SOCB = 101, ECAP_INPUT_EPWM16_SOCB = 102, ECAP_INPUT_EPWM17_SOCB = 103,
  ECAP_INPUT_EPWM18_SOCB = 104, ECAP_INPUT_EPWM19_SOCB = 105, ECAP_INPUT_EPWM20_SOCB = 106, ECAP_INPUT_EPWM21_SOCB = 107,
  ECAP_INPUT_EPWM22_SOCB = 108, ECAP_INPUT_EPWM23_SOCB = 109, ECAP_INPUT_EPWM24_SOCB = 110, ECAP_INPUT_EPWM25_SOCB = 111,
  ECAP_INPUT_EPWM26_SOCB = 112, ECAP_INPUT_EPWM27_SOCB = 113, ECAP_INPUT_EPWM28_SOCB = 114, ECAP_INPUT_EPWM29_SOCB = 115,
  ECAP_INPUT_EPWM30_SOCB = 116, ECAP_INPUT_EPWM31_SOCB = 117, ECAP_INPUT_SDFM0_COMPARE1_HIGH = 118, ECAP_INPUT_SDFM0_COMPARE1_LOW = 119,
  ECAP_INPUT_SDFM0_COMPARE_Z1 = 120, ECAP_INPUT_SDFM0_COMPARE2_HIGH = 121, ECAP_INPUT_SDFM0_COMPARE2_LOW = 122, ECAP_INPUT_SDFM0_COMPARE_Z2 = 123,
  ECAP_INPUT_SDFM0_COMPARE3_HIGH = 124, ECAP_INPUT_SDFM0_COMPARE3_LOW = 125, ECAP_INPUT_SDFM0_COMPARE_Z3 = 126, ECAP_INPUT_SDFM0_COMPARE4_HIGH = 127,
  ECAP_INPUT_SDFM0_COMPARE4_LOW = 128, ECAP_INPUT_SDFM0_COMPARE_Z4 = 129, ECAP_INPUT_SDFM1_COMPARE1_HIGH = 130, ECAP_INPUT_SDFM1_COMPARE1_LOW = 131,
  ECAP_INPUT_SDFM1_COMPARE_Z1 = 132, ECAP_INPUT_SDFM1_COMPARE2_HIGH = 133, ECAP_INPUT_SDFM1_COMPARE2_LOW = 134, ECAP_INPUT_SDFM1_COMPARE_Z2 = 135,
  ECAP_INPUT_SDFM1_COMPARE3_HIGH = 136, ECAP_INPUT_SDFM1_COMPARE3_LOW = 137, ECAP_INPUT_SDFM1_COMPARE_Z3 = 138, ECAP_INPUT_SDFM1_COMPARE4_HIGH = 139,
  ECAP_INPUT_SDFM1_COMPARE4_LOW = 140, ECAP_INPUT_SDFM1_COMPARE_Z4 = 141, ECAP_INPUT_CMPSSA0_CTRIP_LOW = 142, ECAP_INPUT_CMPSSA0_CTRIP_HIGH = 143,
  ECAP_INPUT_CMPSSA1_CTRIP_LOW = 144, ECAP_INPUT_CMPSSA1_CTRIP_HIGH = 145, ECAP_INPUT_CMPSSA2_CTRIP_LOW = 146, ECAP_INPUT_CMPSSA2_CTRIP_HIGH = 147,
  ECAP_INPUT_CMPSSA3_CTRIP_LOW = 148, ECAP_INPUT_CMPSSA3_CTRIP_HIGH = 149, ECAP_INPUT_CMPSSA4_CTRIP_LOW = 150, ECAP_INPUT_CMPSSA4_CTRIP_HIGH = 151,
  ECAP_INPUT_CMPSSA5_CTRIP_LOW = 152, ECAP_INPUT_CMPSSA5_CTRIP_HIGH = 153, ECAP_INPUT_CMPSSA6_CTRIP_LOW = 154, ECAP_INPUT_CMPSSA6_CTRIP_HIGH = 155,
  ECAP_INPUT_CMPSSA7_CTRIP_LOW = 156, ECAP_INPUT_CMPSSA7_CTRIP_HIGH = 157, ECAP_INPUT_CMPSSA8_CTRIP_LOW = 158, ECAP_INPUT_CMPSSA8_CTRIP_HIGH = 159,
  ECAP_INPUT_CMPSSA9_CTRIP_LOW = 160, ECAP_INPUT_CMPSSA9_CTRIP_HIGH = 161, ECAP_INPUT_CMPSSB0_CTRIP_LOW = 162, ECAP_INPUT_CMPSSB0_CTRIP_HIGH = 163,
  ECAP_INPUT_CMPSSB1_CTRIP_LOW = 164, ECAP_INPUT_CMPSSB1_CTRIP_HIGH = 165, ECAP_INPUT_CMPSSB2_CTRIP_LOW = 166, ECAP_INPUT_CMPSSB2_CTRIP_HIGH = 167,
  ECAP_INPUT_CMPSSB3_CTRIP_LOW = 168, ECAP_INPUT_CMPSSB3_CTRIP_HIGH = 169, ECAP_INPUT_CMPSSB4_CTRIP_LOW = 170, ECAP_INPUT_CMPSSB4_CTRIP_HIGH = 171,
  ECAP_INPUT_CMPSSB5_CTRIP_LOW = 172, ECAP_INPUT_CMPSSB5_CTRIP_HIGH = 173, ECAP_INPUT_CMPSSB6_CTRIP_LOW = 174, ECAP_INPUT_CMPSSB6_CTRIP_HIGH = 175,
  ECAP_INPUT_CMPSSB7_CTRIP_LOW = 176, ECAP_INPUT_CMPSSB7_CTRIP_HIGH = 177, ECAP_INPUT_CMPSSB8_CTRIP_LOW = 178, ECAP_INPUT_CMPSSB8_CTRIP_HIGH = 179,
  ECAP_INPUT_CMPSSB9_CTRIP_LOW = 180, ECAP_INPUT_CMPSSB9_CTRIP_HIGH = 181, ECAP_INPUT_ADC0_EVT0 = 182, ECAP_INPUT_ADC0_EVT1 = 183,
  ECAP_INPUT_ADC0_EVT2 = 184, ECAP_INPUT_ADC0_EVT3 = 185, ECAP_INPUT_ADC1_EVT0 = 186, ECAP_INPUT_ADC1_EVT1 = 187,
  ECAP_INPUT_ADC1_EVT2 = 188, ECAP_INPUT_ADC1_EVT3 = 189, ECAP_INPUT_ADC2_EVT0 = 190, ECAP_INPUT_ADC2_EVT1 = 191,
  ECAP_INPUT_ADC2_EVT2 = 192, ECAP_INPUT_ADC2_EVT3 = 193, ECAP_INPUT_ADC3_EVT0 = 194, ECAP_INPUT_ADC3_EVT1 = 195,
  ECAP_INPUT_ADC3_EVT2 = 196, ECAP_INPUT_ADC3_EVT3 = 197, ECAP_INPUT_ADC4_EVT0 = 198, ECAP_INPUT_ADC4_EVT1 = 199,
  ECAP_INPUT_ADC4_EVT2 = 200, ECAP_INPUT_ADC4_EVT3 = 201, ECAP_INPUT_INPUTXBAR0 = 202, ECAP_INPUT_INPUTXBAR1 = 203,
  ECAP_INPUT_INPUTXBAR2 = 204, ECAP_INPUT_INPUTXBAR3 = 205, ECAP_INPUT_INPUTXBAR4 = 206, ECAP_INPUT_INPUTXBAR5 = 207,
  ECAP_INPUT_INPUTXBAR6 = 208, ECAP_INPUT_INPUTXBAR7 = 209, ECAP_INPUT_INPUTXBAR8 = 210, ECAP_INPUT_INPUTXBAR9 = 211,
  ECAP_INPUT_INPUTXBAR10 = 212, ECAP_INPUT_INPUTXBAR11 = 213, ECAP_INPUT_INPUTXBAR12 = 214, ECAP_INPUT_INPUTXBAR13 = 215,
  ECAP_INPUT_INPUTXBAR14 = 216, ECAP_INPUT_INPUTXBAR15 = 217, ECAP_INPUT_INPUTXBAR16 = 218, ECAP_INPUT_INPUTXBAR17 = 219,
  ECAP_INPUT_INPUTXBAR18 = 220, ECAP_INPUT_INPUTXBAR19 = 221, ECAP_INPUT_INPUTXBAR20 = 222, ECAP_INPUT_INPUTXBAR21 = 223,
  ECAP_INPUT_INPUTXBAR22 = 224, ECAP_INPUT_INPUTXBAR23 = 225, ECAP_INPUT_INPUTXBAR24 = 226, ECAP_INPUT_INPUTXBAR25 = 227,
  ECAP_INPUT_INPUTXBAR26 = 228, ECAP_INPUT_INPUTXBAR27 = 229, ECAP_INPUT_INPUTXBAR28 = 230, ECAP_INPUT_INPUTXBAR29 = 231,
  ECAP_INPUT_INPUTXBAR30 = 232, ECAP_INPUT_INPUTXBAR31 = 233
}
 
enum  ECAP_SyncInPulseSource {
  ECAP_SYNC_IN_PULSE_SRC_DISABLE = 0x0, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM0 = 0x1, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM1 = 0x2, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM2 = 0x3,
  ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM3 = 0x4, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM4 = 0x5, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM5 = 0x6, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM6 = 0x7,
  ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM7 = 0x8, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM8 = 0x9, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM9 = 0xA, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM10 = 0xB,
  ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM11 = 0xC, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM12 = 0xD, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM13 = 0xE, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM14 = 0xF,
  ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM15 = 0x10, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM16 = 0x11, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM17 = 0x12, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM18 = 0x13,
  ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM19 = 0x14, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM20 = 0x15, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM21 = 0x16, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM22 = 0x17,
  ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM23 = 0x18, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM24 = 0x19, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM25 = 0x1A, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM26 = 0x1B,
  ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM27 = 0x1C, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM28 = 0x1D, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM29 = 0x1E, ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM30 = 0x1F,
  ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM31 = 0x20
}
 
enum  HRCAP_CalibrationClockSource { HRCAP_CALIBRATION_CLOCK_SYSCLK = 0x0, HRCAP_CALIBRATION_CLOCK_HRCLK = 0x4 }
 
enum  HRCAP_ContinuousCalibrationMode { HRCAP_CONTINUOUS_CALIBRATION_DISABLED = 0x00, HRCAP_CONTINUOUS_CALIBRATION_ENABLED = 0x20 }
 

Macros

#define ECAP_MAX_PRESCALER_VALUE   (32U)
 Header Files. More...
 
#define ECAP_ISR_SOURCE_CAPTURE_EVENT_1   (0x2U)
 Event 1 ISR source. More...
 
#define ECAP_ISR_SOURCE_CAPTURE_EVENT_2   (0x4U)
 Event 2 ISR source. More...
 
#define ECAP_ISR_SOURCE_CAPTURE_EVENT_3   (0x8U)
 Event 3 ISR source. More...
 
#define ECAP_ISR_SOURCE_CAPTURE_EVENT_4   (0x10U)
 Event 4 ISR source. More...
 
#define ECAP_ISR_SOURCE_COUNTER_OVERFLOW   (0x20U)
 Counter overflow ISR source. More...
 
#define ECAP_ISR_SOURCE_COUNTER_PERIOD   (0x40U)
 Counter equals period ISR source. More...
 
#define ECAP_ISR_SOURCE_COUNTER_COMPARE   (0x80U)
 Counter equals compare ISR source. More...
 
#define ECAP_ISR_SOURCE_HR_ERROR   (0x100U)
 High resolution error ISR source. More...
 
#define ECAP_ISR_SOURCE_ALL
 All ISR source. More...
 
#define HRCAP_GLOBAL_CALIBRATION_INTERRUPT   (0x1U)
 Global calibration interrupt flag. More...
 
#define HRCAP_CALIBRATION_DONE   (0x2U)
 Calibration done flag. More...
 
#define HRCAP_CALIBRATION_PERIOD_OVERFLOW   (0x4U)
 Calibration period overflow flag. More...
 

Macro Definition Documentation

◆ ECAP_MAX_PRESCALER_VALUE

#define ECAP_MAX_PRESCALER_VALUE   (32U)

Header Files.

◆ ECAP_ISR_SOURCE_CAPTURE_EVENT_1

#define ECAP_ISR_SOURCE_CAPTURE_EVENT_1   (0x2U)

Event 1 ISR source.

◆ ECAP_ISR_SOURCE_CAPTURE_EVENT_2

#define ECAP_ISR_SOURCE_CAPTURE_EVENT_2   (0x4U)

Event 2 ISR source.

◆ ECAP_ISR_SOURCE_CAPTURE_EVENT_3

#define ECAP_ISR_SOURCE_CAPTURE_EVENT_3   (0x8U)

Event 3 ISR source.

◆ ECAP_ISR_SOURCE_CAPTURE_EVENT_4

#define ECAP_ISR_SOURCE_CAPTURE_EVENT_4   (0x10U)

Event 4 ISR source.

◆ ECAP_ISR_SOURCE_COUNTER_OVERFLOW

#define ECAP_ISR_SOURCE_COUNTER_OVERFLOW   (0x20U)

Counter overflow ISR source.

◆ ECAP_ISR_SOURCE_COUNTER_PERIOD

#define ECAP_ISR_SOURCE_COUNTER_PERIOD   (0x40U)

Counter equals period ISR source.

◆ ECAP_ISR_SOURCE_COUNTER_COMPARE

#define ECAP_ISR_SOURCE_COUNTER_COMPARE   (0x80U)

Counter equals compare ISR source.

◆ ECAP_ISR_SOURCE_HR_ERROR

#define ECAP_ISR_SOURCE_HR_ERROR   (0x100U)

High resolution error ISR source.

◆ ECAP_ISR_SOURCE_ALL

#define ECAP_ISR_SOURCE_ALL
Value:
ECAP_ISR_SOURCE_CAPTURE_EVENT_2 |\
ECAP_ISR_SOURCE_CAPTURE_EVENT_3 |\
ECAP_ISR_SOURCE_CAPTURE_EVENT_4 |\
ECAP_ISR_SOURCE_COUNTER_OVERFLOW |\
ECAP_ISR_SOURCE_COUNTER_PERIOD |\
ECAP_ISR_SOURCE_COUNTER_COMPARE |\
ECAP_ISR_SOURCE_HR_ERROR)

All ISR source.

◆ HRCAP_GLOBAL_CALIBRATION_INTERRUPT

#define HRCAP_GLOBAL_CALIBRATION_INTERRUPT   (0x1U)

Global calibration interrupt flag.

◆ HRCAP_CALIBRATION_DONE

#define HRCAP_CALIBRATION_DONE   (0x2U)

Calibration done flag.

◆ HRCAP_CALIBRATION_PERIOD_OVERFLOW

#define HRCAP_CALIBRATION_PERIOD_OVERFLOW   (0x4U)

Calibration period overflow flag.

Enumeration Type Documentation

◆ ECAP_EmulationMode

Values that can be passed to ECAP_setEmulationMode() as the mode parameter.

Enumerator
ECAP_EMULATION_STOP 

TSCTR is stopped on emulation suspension.

ECAP_EMULATION_RUN_TO_ZERO 

TSCTR runs until 0 before stopping on emulation suspension.

ECAP_EMULATION_FREE_RUN 

TSCTR is not affected by emulation suspension.

◆ ECAP_CaptureMode

Values that can be passed to ECAP_setCaptureMode() as the mode parameter.

Enumerator
ECAP_CONTINUOUS_CAPTURE_MODE 

eCAP operates in continuous capture mode

ECAP_ONE_SHOT_CAPTURE_MODE 

eCAP operates in one shot capture mode

◆ ECAP_Events

Values that can be passed to ECAP_setEventPolarity(),ECAP_setCaptureMode(), ECAP_enableCounterResetOnEvent(),ECAP_disableCounterResetOnEvent(), ECAP_getEventTimeStamp(),ECAP_setDMASource() as the event parameter.

Enumerator
ECAP_EVENT_1 

eCAP event 1

ECAP_EVENT_2 

eCAP event 2

ECAP_EVENT_3 

eCAP event 3

ECAP_EVENT_4 

eCAP event 4

◆ ECAP_SyncOutMode

Values that can be passed to ECAP_setSyncOutMode() as the mode parameter.

Enumerator
ECAP_SYNC_OUT_SYNCI 

sync out on the sync in signal and software force

ECAP_SYNC_OUT_COUNTER_PRD 

sync out on counter equals period

ECAP_SYNC_OUT_DISABLED 

Disable sync out signal.

◆ ECAP_APWMPolarity

Values that can be passed to ECAP_setAPWMPolarity() as the polarity parameter.

Enumerator
ECAP_APWM_ACTIVE_HIGH 

APWM is active high.

ECAP_APWM_ACTIVE_LOW 

APWM is active low.

◆ ECAP_EventPolarity

Values that can be passed to ECAP_setEventPolarity() as the polarity parameter.

Enumerator
ECAP_EVNT_RISING_EDGE 

Rising edge polarity.

ECAP_EVNT_FALLING_EDGE 

Falling edge polarity.

◆ ECAP_InputCaptureSignals

Values that can be passed to ECAP_selectECAPInput() as the input parameter.

Enumerator
ECAP_INPUT_FSI_RX0_TRIG_0 

Capture input is FSI_RX0 Trigger 0.

ECAP_INPUT_FSI_RX0_TRIG_1 

Capture input is FSI_RX0 Trigger 1.

ECAP_INPUT_FSI_RX0_TRIG_2 

Capture input is FSI_RX0 Trigger 2.

ECAP_INPUT_FSI_RX0_TRIG_3 

Capture input is FSI_RX0 Trigger 3.

ECAP_INPUT_FSI_RX1_TRIG_0 

Capture input is FSI_RX1 Trigger 0.

ECAP_INPUT_FSI_RX1_TRIG_1 

Capture input is FSI_RX1 Trigger 1.

ECAP_INPUT_FSI_RX1_TRIG_2 

Capture input is FSI_RX1 Trigger 2.

ECAP_INPUT_FSI_RX1_TRIG_3 

Capture input is FSI_RX1 Trigger 3.

ECAP_INPUT_FSI_RX2_TRIG_0 

Capture input is FSI_RX2 Trigger 0.

ECAP_INPUT_FSI_RX2_TRIG_1 

Capture input is FSI_RX2 Trigger 1.

ECAP_INPUT_FSI_RX2_TRIG_2 

Capture input is FSI_RX2 Trigger 2.

ECAP_INPUT_FSI_RX2_TRIG_3 

Capture input is FSI_RX2 Trigger 3.

ECAP_INPUT_FSI_RX3_TRIG_0 

Capture input is FSI_RX3 Trigger 0.

ECAP_INPUT_FSI_RX3_TRIG_1 

Capture input is FSI_RX3 Trigger 1.

ECAP_INPUT_FSI_RX3_TRIG_2 

Capture input is FSI_RX3 Trigger 2.

ECAP_INPUT_FSI_RX3_TRIG_3 

Capture input is FSI_RX3 Trigger 3.

ECAP_INPUT_EQEP0_QI 

Capture input is EQEP0 QI Signal.

ECAP_INPUT_EQEP0_QS 

Capture input is EQEP0 QS Signal.

ECAP_INPUT_EQEP1_QI 

Capture input is EQEP1 QI Signal.

ECAP_INPUT_EQEP1_QS 

Capture input is EQEP1 QS Signal.

ECAP_INPUT_EQEP2_QI 

Capture input is EQEP2 QI Signal.

ECAP_INPUT_EQEP2_QS 

Capture input is EQEP2 QS Signal.

ECAP_INPUT_EPWM0_SOCA 

Capture input is EPWM0 SOC-A Signal.

ECAP_INPUT_EPWM1_SOCA 

Capture input is EPWM1 SOC-A Signal.

ECAP_INPUT_EPWM2_SOCA 

Capture input is EPWM2 SOC-A Signal.

ECAP_INPUT_EPWM3_SOCA 

Capture input is EPWM3 SOC-A Signal.

ECAP_INPUT_EPWM4_SOCA 

Capture input is EPWM4 SOC-A Signal.

ECAP_INPUT_EPWM5_SOCA 

Capture input is EPWM5 SOC-A Signal.

ECAP_INPUT_EPWM6_SOCA 

Capture input is EPWM6 SOC-A Signal.

ECAP_INPUT_EPWM7_SOCA 

Capture input is EPWM7 SOC-A Signal.

ECAP_INPUT_EPWM8_SOCA 

Capture input is EPWM8 SOC-A Signal.

ECAP_INPUT_EPWM9_SOCA 

Capture input is EPWM9 SOC-A Signal.

ECAP_INPUT_EPWM10_SOCA 

Capture input is EPWM10 SOC-A Signal.

ECAP_INPUT_EPWM11_SOCA 

Capture input is EPWM11 SOC-A Signal.

ECAP_INPUT_EPWM12_SOCA 

Capture input is EPWM12 SOC-A Signal.

ECAP_INPUT_EPWM13_SOCA 

Capture input is EPWM13 SOC-A Signal.

ECAP_INPUT_EPWM14_SOCA 

Capture input is EPWM14 SOC-A Signal.

ECAP_INPUT_EPWM15_SOCA 

Capture input is EPWM15 SOC-A Signal.

ECAP_INPUT_EPWM16_SOCA 

Capture input is EPWM16 SOC-A Signal.

ECAP_INPUT_EPWM17_SOCA 

Capture input is EPWM17 SOC-A Signal.

ECAP_INPUT_EPWM18_SOCA 

Capture input is EPWM18 SOC-A Signal.

ECAP_INPUT_EPWM19_SOCA 

Capture input is EPWM19 SOC-A Signal.

ECAP_INPUT_EPWM20_SOCA 

Capture input is EPWM20 SOC-A Signal.

ECAP_INPUT_EPWM21_SOCA 

Capture input is EPWM21 SOC-A Signal.

ECAP_INPUT_EPWM22_SOCA 

Capture input is EPWM22 SOC-A Signal.

ECAP_INPUT_EPWM23_SOCA 

Capture input is EPWM23 SOC-A Signal.

ECAP_INPUT_EPWM24_SOCA 

Capture input is EPWM24 SOC-A Signal.

ECAP_INPUT_EPWM25_SOCA 

Capture input is EPWM25 SOC-A Signal.

ECAP_INPUT_EPWM26_SOCA 

Capture input is EPWM26 SOC-A Signal.

ECAP_INPUT_EPWM27_SOCA 

Capture input is EPWM27 SOC-A Signal.

ECAP_INPUT_EPWM28_SOCA 

Capture input is EPWM28 SOC-A Signal.

ECAP_INPUT_EPWM29_SOCA 

Capture input is EPWM29 SOC-A Signal.

ECAP_INPUT_EPWM30_SOCA 

Capture input is EPWM30 SOC-A Signal.

ECAP_INPUT_EPWM31_SOCA 

Capture input is EPWM31 SOC-A Signal.

ECAP_INPUT_EPWM0_SOCB 

Capture input is EPWM0 SOC-B Signal.

ECAP_INPUT_EPWM1_SOCB 

Capture input is EPWM1 SOC-B Signal.

ECAP_INPUT_EPWM2_SOCB 

Capture input is EPWM2 SOC-B Signal.

ECAP_INPUT_EPWM3_SOCB 

Capture input is EPWM3 SOC-B Signal.

ECAP_INPUT_EPWM4_SOCB 

Capture input is EPWM4 SOC-B Signal.

ECAP_INPUT_EPWM5_SOCB 

Capture input is EPWM5 SOC-B Signal.

ECAP_INPUT_EPWM6_SOCB 

Capture input is EPWM6 SOC-B Signal.

ECAP_INPUT_EPWM7_SOCB 

Capture input is EPWM7 SOC-B Signal.

ECAP_INPUT_EPWM8_SOCB 

Capture input is EPWM8 SOC-B Signal.

ECAP_INPUT_EPWM9_SOCB 

Capture input is EPWM9 SOC-B Signal.

ECAP_INPUT_EPWM10_SOCB 

Capture input is EPWM10 SOC-B Signal.

ECAP_INPUT_EPWM11_SOCB 

Capture input is EPWM11 SOC-B Signal.

ECAP_INPUT_EPWM12_SOCB 

Capture input is EPWM12 SOC-B Signal.

ECAP_INPUT_EPWM13_SOCB 

Capture input is EPWM13 SOC-B Signal.

ECAP_INPUT_EPWM14_SOCB 

Capture input is EPWM14 SOC-B Signal.

ECAP_INPUT_EPWM15_SOCB 

Capture input is EPWM15 SOC-B Signal.

ECAP_INPUT_EPWM16_SOCB 

Capture input is EPWM16 SOC-B Signal.

ECAP_INPUT_EPWM17_SOCB 

Capture input is EPWM17 SOC-B Signal.

ECAP_INPUT_EPWM18_SOCB 

Capture input is EPWM18 SOC-B Signal.

ECAP_INPUT_EPWM19_SOCB 

Capture input is EPWM19 SOC-B Signal.

ECAP_INPUT_EPWM20_SOCB 

Capture input is EPWM20 SOC-B Signal.

ECAP_INPUT_EPWM21_SOCB 

Capture input is EPWM21 SOC-B Signal.

ECAP_INPUT_EPWM22_SOCB 

Capture input is EPWM22 SOC-B Signal.

ECAP_INPUT_EPWM23_SOCB 

Capture input is EPWM23 SOC-B Signal.

ECAP_INPUT_EPWM24_SOCB 

Capture input is EPWM24 SOC-B Signal.

ECAP_INPUT_EPWM25_SOCB 

Capture input is EPWM25 SOC-B Signal.

ECAP_INPUT_EPWM26_SOCB 

Capture input is EPWM26 SOC-B Signal.

ECAP_INPUT_EPWM27_SOCB 

Capture input is EPWM27 SOC-B Signal.

ECAP_INPUT_EPWM28_SOCB 

Capture input is EPWM28 SOC-B Signal.

ECAP_INPUT_EPWM29_SOCB 

Capture input is EPWM29 SOC-B Signal.

ECAP_INPUT_EPWM30_SOCB 

Capture input is EPWM30 SOC-B Signal.

ECAP_INPUT_EPWM31_SOCB 

Capture input is EPWM31 SOC-B Signal.

ECAP_INPUT_SDFM0_COMPARE1_HIGH 

Capture input is SDFM0 Compare1 High.

ECAP_INPUT_SDFM0_COMPARE1_LOW 

Capture input is SDFM0 Compare1 Low.

ECAP_INPUT_SDFM0_COMPARE_Z1 

Capture input is SDFM0 Compare Z1.

ECAP_INPUT_SDFM0_COMPARE2_HIGH 

Capture input is SDFM0 Compare2 High.

ECAP_INPUT_SDFM0_COMPARE2_LOW 

Capture input is SDFM0 Compare2 Low.

ECAP_INPUT_SDFM0_COMPARE_Z2 

Capture input is SDFM0 Compare Z2.

ECAP_INPUT_SDFM0_COMPARE3_HIGH 

Capture input is SDFM0 Compare3 High.

ECAP_INPUT_SDFM0_COMPARE3_LOW 

Capture input is SDFM0 Compare3 Low.

ECAP_INPUT_SDFM0_COMPARE_Z3 

Capture input is SDFM0 Compare Z3.

ECAP_INPUT_SDFM0_COMPARE4_HIGH 

Capture input is SDFM0 Compare4 High.

ECAP_INPUT_SDFM0_COMPARE4_LOW 

Capture input is SDFM0 Compare4 Low.

ECAP_INPUT_SDFM0_COMPARE_Z4 

Capture input is SDFM0 Compare Z4.

ECAP_INPUT_SDFM1_COMPARE1_HIGH 

Capture input is SDFM1 Compare1 High.

ECAP_INPUT_SDFM1_COMPARE1_LOW 

Capture input is SDFM1 Compare1 Low.

ECAP_INPUT_SDFM1_COMPARE_Z1 

Capture input is SDFM1 Compare Z1.

ECAP_INPUT_SDFM1_COMPARE2_HIGH 

Capture input is SDFM1 Compare2 High.

ECAP_INPUT_SDFM1_COMPARE2_LOW 

Capture input is SDFM1 Compare2 Low.

ECAP_INPUT_SDFM1_COMPARE_Z2 

Capture input is SDFM1 Compare Z2.

ECAP_INPUT_SDFM1_COMPARE3_HIGH 

Capture input is SDFM1 Compare3 High.

ECAP_INPUT_SDFM1_COMPARE3_LOW 

Capture input is SDFM1 Compare3 Low.

ECAP_INPUT_SDFM1_COMPARE_Z3 

Capture input is SDFM1 Compare Z3.

ECAP_INPUT_SDFM1_COMPARE4_HIGH 

Capture input is SDFM1 Compare4 High.

ECAP_INPUT_SDFM1_COMPARE4_LOW 

Capture input is SDFM1 Compare4 Low.

ECAP_INPUT_SDFM1_COMPARE_Z4 

Capture input is SDFM1 Compare Z4.

ECAP_INPUT_CMPSSA0_CTRIP_LOW 

Capture input is CMPSSA0 CTRIP_LOW.

ECAP_INPUT_CMPSSA0_CTRIP_HIGH 

Capture input is CMPSSA0 CTRIP_HIGH.

ECAP_INPUT_CMPSSA1_CTRIP_LOW 

Capture input is CMPSSA1 CTRIP_LOW.

ECAP_INPUT_CMPSSA1_CTRIP_HIGH 

Capture input is CMPSSA1 CTRIP_HIGH.

ECAP_INPUT_CMPSSA2_CTRIP_LOW 

Capture input is CMPSSA2 CTRIP_LOW.

ECAP_INPUT_CMPSSA2_CTRIP_HIGH 

Capture input is CMPSSA2 CTRIP_HIGH.

ECAP_INPUT_CMPSSA3_CTRIP_LOW 

Capture input is CMPSSA3 CTRIP_LOW.

ECAP_INPUT_CMPSSA3_CTRIP_HIGH 

Capture input is CMPSSA3 CTRIP_HIGH.

ECAP_INPUT_CMPSSA4_CTRIP_LOW 

Capture input is CMPSSA4 CTRIP_LOW.

ECAP_INPUT_CMPSSA4_CTRIP_HIGH 

Capture input is CMPSSA4 CTRIP_HIGH.

ECAP_INPUT_CMPSSA5_CTRIP_LOW 

Capture input is CMPSSA5 CTRIP_LOW.

ECAP_INPUT_CMPSSA5_CTRIP_HIGH 

Capture input is CMPSSA5 CTRIP_HIGH.

ECAP_INPUT_CMPSSA6_CTRIP_LOW 

Capture input is CMPSSA6 CTRIP_LOW.

ECAP_INPUT_CMPSSA6_CTRIP_HIGH 

Capture input is CMPSSA6 CTRIP_HIGH.

ECAP_INPUT_CMPSSA7_CTRIP_LOW 

Capture input is CMPSSA7 CTRIP_LOW.

ECAP_INPUT_CMPSSA7_CTRIP_HIGH 

Capture input is CMPSSA7 CTRIP_HIGH.

ECAP_INPUT_CMPSSA8_CTRIP_LOW 

Capture input is CMPSSA8 CTRIP_LOW.

ECAP_INPUT_CMPSSA8_CTRIP_HIGH 

Capture input is CMPSSA8 CTRIP_HIGH.

ECAP_INPUT_CMPSSA9_CTRIP_LOW 

Capture input is CMPSSA9 CTRIP_LOW.

ECAP_INPUT_CMPSSA9_CTRIP_HIGH 

Capture input is CMPSSA9 CTRIP_HIGH.

ECAP_INPUT_CMPSSB0_CTRIP_LOW 

Capture input is CMPSSB0 CTRIP_LOW.

ECAP_INPUT_CMPSSB0_CTRIP_HIGH 

Capture input is CMPSSB0 CTRIP_HIGH.

ECAP_INPUT_CMPSSB1_CTRIP_LOW 

Capture input is CMPSSB1 CTRIP_LOW.

ECAP_INPUT_CMPSSB1_CTRIP_HIGH 

Capture input is CMPSSB1 CTRIP_HIGH.

ECAP_INPUT_CMPSSB2_CTRIP_LOW 

Capture input is CMPSSB2 CTRIP_LOW.

ECAP_INPUT_CMPSSB2_CTRIP_HIGH 

Capture input is CMPSSB2 CTRIP_HIGH.

ECAP_INPUT_CMPSSB3_CTRIP_LOW 

Capture input is CMPSSB3 CTRIP_LOW.

ECAP_INPUT_CMPSSB3_CTRIP_HIGH 

Capture input is CMPSSB3 CTRIP_HIGH.

ECAP_INPUT_CMPSSB4_CTRIP_LOW 

Capture input is CMPSSB4 CTRIP_LOW.

ECAP_INPUT_CMPSSB4_CTRIP_HIGH 

Capture input is CMPSSB4 CTRIP_HIGH.

ECAP_INPUT_CMPSSB5_CTRIP_LOW 

Capture input is CMPSSB5 CTRIP_LOW.

ECAP_INPUT_CMPSSB5_CTRIP_HIGH 

Capture input is CMPSSB5 CTRIP_HIGH.

ECAP_INPUT_CMPSSB6_CTRIP_LOW 

Capture input is CMPSSB6 CTRIP_LOW.

ECAP_INPUT_CMPSSB6_CTRIP_HIGH 

Capture input is CMPSSB6 CTRIP_HIGH.

ECAP_INPUT_CMPSSB7_CTRIP_LOW 

Capture input is CMPSSB7 CTRIP_LOW.

ECAP_INPUT_CMPSSB7_CTRIP_HIGH 

Capture input is CMPSSB7 CTRIP_HIGH.

ECAP_INPUT_CMPSSB8_CTRIP_LOW 

Capture input is CMPSSB8 CTRIP_LOW.

ECAP_INPUT_CMPSSB8_CTRIP_HIGH 

Capture input is CMPSSB8 CTRIP_HIGH.

ECAP_INPUT_CMPSSB9_CTRIP_LOW 

Capture input is CMPSSB9 CTRIP_LOW.

ECAP_INPUT_CMPSSB9_CTRIP_HIGH 

Capture input is CMPSSB9 CTRIP_HIGH.

ECAP_INPUT_ADC0_EVT0 

Capture input is ADC0 Event 0.

ECAP_INPUT_ADC0_EVT1 

Capture input is ADC0 Event 1.

ECAP_INPUT_ADC0_EVT2 

Capture input is ADC0 Event 2.

ECAP_INPUT_ADC0_EVT3 

Capture input is ADC0 Event 3.

ECAP_INPUT_ADC1_EVT0 

Capture input is ADC1 Event 0.

ECAP_INPUT_ADC1_EVT1 

Capture input is ADC1 Event 1.

ECAP_INPUT_ADC1_EVT2 

Capture input is ADC1 Event 2.

ECAP_INPUT_ADC1_EVT3 

Capture input is ADC1 Event 3.

ECAP_INPUT_ADC2_EVT0 

Capture input is ADC2 Event 0.

ECAP_INPUT_ADC2_EVT1 

Capture input is ADC2 Event 1.

ECAP_INPUT_ADC2_EVT2 

Capture input is ADC2 Event 2.

ECAP_INPUT_ADC2_EVT3 

Capture input is ADC2 Event 3.

ECAP_INPUT_ADC3_EVT0 

Capture input is ADC3 Event 0.

ECAP_INPUT_ADC3_EVT1 

Capture input is ADC3 Event 1.

ECAP_INPUT_ADC3_EVT2 

Capture input is ADC3 Event 2.

ECAP_INPUT_ADC3_EVT3 

Capture input is ADC3 Event 3.

ECAP_INPUT_ADC4_EVT0 

Capture input is ADC4 Event 0.

ECAP_INPUT_ADC4_EVT1 

Capture input is ADC4 Event 1.

ECAP_INPUT_ADC4_EVT2 

Capture input is ADC4 Event 2.

ECAP_INPUT_ADC4_EVT3 

Capture input is ADC4 Event 3.

ECAP_INPUT_INPUTXBAR0 

Capture input is InputXBar Output 0.

ECAP_INPUT_INPUTXBAR1 

Capture input is InputXBar Output 1.

ECAP_INPUT_INPUTXBAR2 

Capture input is InputXBar Output 2.

ECAP_INPUT_INPUTXBAR3 

Capture input is InputXBar Output 3.

ECAP_INPUT_INPUTXBAR4 

Capture input is InputXBar Output 4.

ECAP_INPUT_INPUTXBAR5 

Capture input is InputXBar Output 5.

ECAP_INPUT_INPUTXBAR6 

Capture input is InputXBar Output 6.

ECAP_INPUT_INPUTXBAR7 

Capture input is InputXBar Output 7.

ECAP_INPUT_INPUTXBAR8 

Capture input is InputXBar Output 8.

ECAP_INPUT_INPUTXBAR9 

Capture input is InputXBar Output 9.

ECAP_INPUT_INPUTXBAR10 

Capture input is InputXBar Output 10.

ECAP_INPUT_INPUTXBAR11 

Capture input is InputXBar Output 11.

ECAP_INPUT_INPUTXBAR12 

Capture input is InputXBar Output 12.

ECAP_INPUT_INPUTXBAR13 

Capture input is InputXBar Output 13.

ECAP_INPUT_INPUTXBAR14 

Capture input is InputXBar Output 14.

ECAP_INPUT_INPUTXBAR15 

Capture input is InputXBar Output 15.

ECAP_INPUT_INPUTXBAR16 

Capture input is InputXBar Output 16.

ECAP_INPUT_INPUTXBAR17 

Capture input is InputXBar Output 17.

ECAP_INPUT_INPUTXBAR18 

Capture input is InputXBar Output 18.

ECAP_INPUT_INPUTXBAR19 

Capture input is InputXBar Output 19.

ECAP_INPUT_INPUTXBAR20 

Capture input is InputXBar Output 20.

ECAP_INPUT_INPUTXBAR21 

Capture input is InputXBar Output 21.

ECAP_INPUT_INPUTXBAR22 

Capture input is InputXBar Output 22.

ECAP_INPUT_INPUTXBAR23 

Capture input is InputXBar Output 23.

ECAP_INPUT_INPUTXBAR24 

Capture input is InputXBar Output 24.

ECAP_INPUT_INPUTXBAR25 

Capture input is InputXBar Output 25.

ECAP_INPUT_INPUTXBAR26 

Capture input is InputXBar Output 26.

ECAP_INPUT_INPUTXBAR27 

Capture input is InputXBar Output 27.

ECAP_INPUT_INPUTXBAR28 

Capture input is InputXBar Output 28.

ECAP_INPUT_INPUTXBAR29 

Capture input is InputXBar Output 29.

ECAP_INPUT_INPUTXBAR30 

Capture input is InputXBar Output 30.

ECAP_INPUT_INPUTXBAR31 

Capture input is InputXBar Output 31.

◆ ECAP_SyncInPulseSource

Values that can be passed to ECAP_setSyncInPulseSource() as the mode parameter.

Enumerator
ECAP_SYNC_IN_PULSE_SRC_DISABLE 

Disable Sync-in.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM0 

Sync-in source is EPWM0 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM1 

Sync-in source is EPWM1 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM2 

Sync-in source is EPWM2 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM3 

Sync-in source is EPWM3 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM4 

Sync-in source is EPWM4 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM5 

Sync-in source is EPWM5 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM6 

Sync-in source is EPWM6 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM7 

Sync-in source is EPWM7 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM8 

Sync-in source is EPWM8 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM9 

Sync-in source is EPWM9 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM10 

Sync-in source is EPWM10 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM11 

Sync-in source is EPWM11 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM12 

Sync-in source is EPWM12 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM13 

Sync-in source is EPWM13 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM14 

Sync-in source is EPWM14 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM15 

Sync-in source is EPWM15 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM16 

Sync-in source is EPWM16 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM17 

Sync-in source is EPWM17 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM18 

Sync-in source is EPWM18 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM19 

Sync-in source is EPWM19 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM20 

Sync-in source is EPWM20 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM21 

Sync-in source is EPWM21 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM22 

Sync-in source is EPWM22 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM23 

Sync-in source is EPWM23 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM24 

Sync-in source is EPWM24 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM25 

Sync-in source is EPWM25 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM26 

Sync-in source is EPWM26 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM27 

Sync-in source is EPWM27 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM28 

Sync-in source is EPWM28 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM29 

Sync-in source is EPWM29 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM30 

Sync-in source is EPWM30 sync-out signal.

ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM31 

Sync-in source is EPWM31 sync-out signal.

◆ HRCAP_CalibrationClockSource

Values that can be passed to HRCAP_getCalibrationClockPeriod() as the clockSource parameter.

Enumerator
HRCAP_CALIBRATION_CLOCK_SYSCLK 

Use SYSCLK for period match.

HRCAP_CALIBRATION_CLOCK_HRCLK 

Use HRCLK for period match.

◆ HRCAP_ContinuousCalibrationMode

Values that can be passed to HRCAP_setCalibrationMode(), as the continuousMode parameter.

Enumerator
HRCAP_CONTINUOUS_CALIBRATION_DISABLED 

Continuous calibration disabled.

HRCAP_CONTINUOUS_CALIBRATION_ENABLED 

Continuous calibration enabled.

Function Documentation

◆ ECAP_setEventPrescaler()

static void ECAP_setEventPrescaler ( uint32_t  base,
uint16_t  preScalerValue 
)
inlinestatic

Sets the input prescaler.

Parameters
baseis the base address of the ECAP module.
preScalerValueis the pre scaler value for ECAP input

This function divides the ECAP input scaler. The pre scale value is doubled inside the module. For example a preScalerValue of 5 will divide the scaler by 10. Use a value of 1 to divide the pre scaler by 1. The value of preScalerValue should be less than ECAP_MAX_PRESCALER_VALUE.

Returns
None.

◆ ECAP_setEventPolarity()

static void ECAP_setEventPolarity ( uint32_t  base,
ECAP_Events  event,
ECAP_EventPolarity  polarity 
)
inlinestatic

Sets the Capture event polarity.

Parameters
baseis the base address of the ECAP module.
eventis the event number.
polarityis the polarity of the event.

This function sets the polarity of a given event. The value of event is between ECAP_EVENT_1 and ECAP_EVENT_4 inclusive corresponding to the four available events.For each event the polarity value determines the edge on which the capture is activated. For a rising edge use a polarity value of ECAP_EVNT_RISING_EDGE and for a falling edge use a polarity of ECAP_EVNT_FALLING_EDGE.

Returns
None.

◆ ECAP_setCaptureMode()

static void ECAP_setCaptureMode ( uint32_t  base,
ECAP_CaptureMode  mode,
ECAP_Events  event 
)
inlinestatic

Sets the capture mode.

Parameters
baseis the base address of the ECAP module.
modeis the capture mode.
eventis the event number at which the counter stops or wraps.

This function sets the eCAP module to a continuous or one-shot mode. The value of mode should be either ECAP_CONTINUOUS_CAPTURE_MODE or ECAP_ONE_SHOT_CAPTURE_MODE corresponding to continuous or one-shot mode respectively.

The value of event determines the event number at which the counter stops (in one-shot mode) or the counter wraps (in continuous mode). The value of event should be between ECAP_EVENT_1 and ECAP_EVENT_4 corresponding to the valid event numbers.

Returns
None.

◆ ECAP_reArm()

static void ECAP_reArm ( uint32_t  base)
inlinestatic

Re-arms the eCAP module.

Parameters
baseis the base address of the ECAP module.

This function re-arms the eCAP module.

Returns
None.

◆ ECAP_enableInterrupt()

static void ECAP_enableInterrupt ( uint32_t  base,
uint16_t  intFlags 
)
inlinestatic

Enables interrupt source.

Parameters
baseis the base address of the ECAP module.
intFlagsis the interrupt source to be enabled.

This function sets and enables eCAP interrupt source. The following are valid interrupt sources.

  • ECAP_ISR_SOURCE_CAPTURE_EVENT_1 - Event 1 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_2 - Event 2 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_3 - Event 3 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_4 - Event 4 generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_OVERFLOW - Counter overflow generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_PERIOD - Counter equal period generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_COMPARE - Counter equal compare generates interrupt
  • ECAP_ISR_SOURCE_HR_ERROR - High resolution error generates interrupt
Returns
None.

◆ ECAP_disableInterrupt()

static void ECAP_disableInterrupt ( uint32_t  base,
uint16_t  intFlags 
)
inlinestatic

Disables interrupt source.

Parameters
baseis the base address of the ECAP module.
intFlagsis the interrupt source to be disabled.

This function clears and disables eCAP interrupt source. The following are valid interrupt sources.

  • ECAP_ISR_SOURCE_CAPTURE_EVENT_1 - Event 1 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_2 - Event 2 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_3 - Event 3 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_4 - Event 4 generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_OVERFLOW - Counter overflow generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_PERIOD - Counter equal period generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_COMPARE - Counter equal compare generates interrupt
  • ECAP_ISR_SOURCE_HR_ERROR - High resolution error generates interrupt
Returns
None.

◆ ECAP_getInterruptSource()

static uint16_t ECAP_getInterruptSource ( uint32_t  base)
inlinestatic

Returns the interrupt flag.

Parameters
baseis the base address of the ECAP module.

This function returns the eCAP interrupt flag. The following are valid interrupt sources corresponding to the eCAP interrupt flag.

Returns
Returns the eCAP interrupt that has occurred. The following are valid return values.
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_1 - Event 1 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_2 - Event 2 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_3 - Event 3 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_4 - Event 4 generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_OVERFLOW - Counter overflow generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_PERIOD - Counter equal period generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_COMPARE - Counter equal compare generates interrupt
  • ECAP_ISR_SOURCE_HR_ERROR - High resolution error generates interrupt
Note
- User can check if a combination of various interrupts have occurred by ORing the above return values.

◆ ECAP_getGlobalInterruptStatus()

static bool ECAP_getGlobalInterruptStatus ( uint32_t  base)
inlinestatic

Returns the Global interrupt flag.

Parameters
baseis the base address of the ECAP module.

This function returns the eCAP Global interrupt flag.

Returns
Returns true if there is a global eCAP interrupt, false otherwise.

◆ ECAP_clearInterrupt()

static void ECAP_clearInterrupt ( uint32_t  base,
uint16_t  intFlags 
)
inlinestatic

Clears interrupt flag.

Parameters
baseis the base address of the ECAP module.
intFlagsis the interrupt source.

This function clears eCAP interrupt flags. The following are valid interrupt sources.

  • ECAP_ISR_SOURCE_CAPTURE_EVENT_1 - Event 1 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_2 - Event 2 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_3 - Event 3 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_4 - Event 4 generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_OVERFLOW - Counter overflow generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_PERIOD - Counter equal period generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_COMPARE - Counter equal compare generates interrupt
  • ECAP_ISR_SOURCE_HR_ERROR - High resolution error generates interrupt
Returns
None.

◆ ECAP_clearGlobalInterrupt()

static void ECAP_clearGlobalInterrupt ( uint32_t  base)
inlinestatic

Clears global interrupt flag

Parameters
baseis the base address of the ECAP module.

This function clears the global interrupt bit.

Returns
None.

◆ ECAP_forceInterrupt()

static void ECAP_forceInterrupt ( uint32_t  base,
uint16_t  intFlags 
)
inlinestatic

Forces interrupt source.

Parameters
baseis the base address of the ECAP module.
intFlagsis the interrupt source.

This function forces and enables eCAP interrupt source. The following are valid interrupt sources.

  • ECAP_ISR_SOURCE_CAPTURE_EVENT_1 - Event 1 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_2 - Event 2 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_3 - Event 3 generates interrupt
  • ECAP_ISR_SOURCE_CAPTURE_EVENT_4 - Event 4 generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_OVERFLOW - Counter overflow generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_PERIOD - Counter equal period generates interrupt
  • ECAP_ISR_SOURCE_COUNTER_COMPARE - Counter equal compare generates interrupt
  • ECAP_ISR_SOURCE_HR_ERROR - High resolution error generates interrupt
Returns
None.

◆ ECAP_enableCaptureMode()

static void ECAP_enableCaptureMode ( uint32_t  base)
inlinestatic

Sets eCAP in Capture mode.

Parameters
baseis the base address of the ECAP module.

This function sets the eCAP module to operate in Capture mode.

Returns
None.

◆ ECAP_enableAPWMMode()

static void ECAP_enableAPWMMode ( uint32_t  base)
inlinestatic

Sets eCAP in APWM mode.

Parameters
baseis the base address of the ECAP module.

This function sets the eCAP module to operate in APWM mode.

Returns
None.

◆ ECAP_enableCounterResetOnEvent()

static void ECAP_enableCounterResetOnEvent ( uint32_t  base,
ECAP_Events  event 
)
inlinestatic

Enables counter reset on an event.

Parameters
baseis the base address of the ECAP module.
eventis the event number the time base gets reset.

This function enables the base timer, TSCTR, to be reset on capture event provided by the variable event. Valid inputs for event are ECAP_EVENT_1 to ECAP_EVENT_4.

Returns
None.

◆ ECAP_disableCounterResetOnEvent()

static void ECAP_disableCounterResetOnEvent ( uint32_t  base,
ECAP_Events  event 
)
inlinestatic

Disables counter reset on events.

Parameters
baseis the base address of the ECAP module.
eventis the event number the time base gets reset.

This function disables the base timer, TSCTR, from being reset on capture event provided by the variable event. Valid inputs for event are ECAP_EVENT_1 to ECAP_EVENT_4.

Returns
None.

◆ ECAP_enableTimeStampCapture()

static void ECAP_enableTimeStampCapture ( uint32_t  base)
inlinestatic

Enables time stamp capture.

Parameters
baseis the base address of the ECAP module.

This function enables time stamp count to be captured

Returns
None.

◆ ECAP_disableTimeStampCapture()

static void ECAP_disableTimeStampCapture ( uint32_t  base)
inlinestatic

Disables time stamp capture.

Parameters
baseis the base address of the ECAP module.

This function disables time stamp count to be captured

Returns
None.

◆ ECAP_setPhaseShiftCount()

static void ECAP_setPhaseShiftCount ( uint32_t  base,
uint32_t  shiftCount 
)
inlinestatic

Sets a phase shift value count.

Parameters
baseis the base address of the ECAP module.
shiftCountis the phase shift value.

This function writes a phase shift value to be loaded into the main time stamp counter.

Returns
None.

◆ ECAP_setSyncInPulseSource()

static void ECAP_setSyncInPulseSource ( uint32_t  base,
ECAP_SyncInPulseSource  source 
)
inlinestatic

Set up the source for sync-in pulse.

Parameters
baseis the base address of the ECAP module.
sourceis the sync-in pulse source.

This function set the sync out pulse mode. Valid values for mode are:

  • ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM1-16 - sync-in pulse source can be any of the EPWM1-16 sync-out signal
  • ECAP_SYNC_IN_PULSE_SRC_SYNCOUT_ECAP1-7 - sync-in pulse source can be selected as any of the ECAP1-16 sync-out signal
  • ECAP_SYNC_IN_PULSE_SRC_INPUTXBAR_OUT5-6 - sync-in pulse source can be selected as any of the Input xbar out5-6 signal
  • ECAP_SYNC_IN_PULSE_SRC_ETHERCAT_SYNC0-1 - sync-in pulse source can be selected as any of the Ethercat sync0-1 signal
  • ECAP_SYNC_IN_PULSE_SRC_DISABLE - sync-in pulse is disabled for the ECAP module
Returns
None.

◆ ECAP_enableLoadCounter()

static void ECAP_enableLoadCounter ( uint32_t  base)
inlinestatic

Enable counter loading with phase shift value.

Parameters
baseis the base address of the ECAP module.

This function enables loading of the counter with the value present in the phase shift counter as defined by the ECAP_setPhaseShiftCount() function.

Returns
None.

◆ ECAP_disableLoadCounter()

static void ECAP_disableLoadCounter ( uint32_t  base)
inlinestatic

Disable counter loading with phase shift value.

Parameters
baseis the base address of the ECAP module.

This function disables loading of the counter with the value present in the phase shift counter as defined by the ECAP_setPhaseShiftCount() function.

Returns
None.

◆ ECAP_loadCounter()

static void ECAP_loadCounter ( uint32_t  base)
inlinestatic

Load time stamp counter

Parameters
baseis the base address of the ECAP module.

This function forces the value in the phase shift counter register to be loaded into Time stamp counter register. Make sure to enable loading of Time stamp counter by calling ECAP_enableLoadCounter() function before calling this function.

Returns
None.

◆ ECAP_setSyncOutMode()

static void ECAP_setSyncOutMode ( uint32_t  base,
ECAP_SyncOutMode  mode 
)
inlinestatic

Configures Sync out signal mode.

Parameters
baseis the base address of the ECAP module.
modeis the sync out mode.

This function sets the sync out mode. Valid parameters for mode are:

  • ECAP_SYNC_OUT_SYNCI - Trigger sync out on sync-in event.
  • ECAP_SYNC_OUT_COUNTER_PRD - Trigger sync out when counter equals period.
  • ECAP_SYNC_OUT_DISABLED - Disable sync out.
Returns
None.

◆ ECAP_stopCounter()

static void ECAP_stopCounter ( uint32_t  base)
inlinestatic

Stops Time stamp counter.

Parameters
baseis the base address of the ECAP module.

This function stops the time stamp counter.

Returns
None.

◆ ECAP_startCounter()

static void ECAP_startCounter ( uint32_t  base)
inlinestatic

Starts Time stamp counter.

Parameters
baseis the base address of the ECAP module.

This function starts the time stamp counter.

Returns
None.

◆ ECAP_setAPWMPolarity()

static void ECAP_setAPWMPolarity ( uint32_t  base,
ECAP_APWMPolarity  polarity 
)
inlinestatic

Set eCAP APWM polarity.

Parameters
baseis the base address of the ECAP module.
polarityis the polarity of APWM

This function sets the polarity of the eCAP in APWM mode. Valid inputs for polarity are:

  • ECAP_APWM_ACTIVE_HIGH - For active high.
  • ECAP_APWM_ACTIVE_LOW - For active low.
Returns
None.

◆ ECAP_setAPWMPeriod()

static void ECAP_setAPWMPeriod ( uint32_t  base,
uint32_t  periodCount 
)
inlinestatic

Set eCAP APWM period.

Parameters
baseis the base address of the ECAP module.
periodCountis the period count for APWM.

This function sets the period count of the APWM waveform. periodCount takes the actual count which is written to the register. The user is responsible for converting the desired frequency or time into the period count.

Returns
None.

◆ ECAP_setAPWMCompare()

static void ECAP_setAPWMCompare ( uint32_t  base,
uint32_t  compareCount 
)
inlinestatic

Set eCAP APWM on or off time count.

Parameters
baseis the base address of the ECAP module.
compareCountis the on or off count for APWM.

This function sets the on or off time count of the APWM waveform depending on the polarity of the output. If the output , as set by ECAP_setAPWMPolarity(), is active high then compareCount determines the on time. If the output is active low then compareCount determines the off time. compareCount takes the actual count which is written to the register. The user is responsible for converting the desired frequency or time into the appropriate count value.

Returns
None.

◆ ECAP_setAPWMShadowPeriod()

static void ECAP_setAPWMShadowPeriod ( uint32_t  base,
uint32_t  periodCount 
)
inlinestatic

Load eCAP APWM shadow period.

Parameters
baseis the base address of the ECAP module.
periodCountis the shadow period count for APWM.

This function sets the shadow period count of the APWM waveform. periodCount takes the actual count which is written to the register. The user is responsible for converting the desired frequency or time into the period count.

Returns
None.

◆ ECAP_setAPWMShadowCompare()

static void ECAP_setAPWMShadowCompare ( uint32_t  base,
uint32_t  compareCount 
)
inlinestatic

Set eCAP APWM shadow on or off time count.

Parameters
baseis the base address of the ECAP module.
compareCountis the on or off count for APWM.

This function sets the shadow on or off time count of the APWM waveform depending on the polarity of the output. If the output , as set by ECAP_setAPWMPolarity() , is active high then compareCount determines the on time. If the output is active low then compareCount determines the off time. compareCount takes the actual count which is written to the register. The user is responsible for converting the desired frequency or time into the appropriate count value.

Returns
None.

◆ ECAP_getTimeBaseCounter()

static uint32_t ECAP_getTimeBaseCounter ( uint32_t  base)
inlinestatic

Returns the time base counter value.

Parameters
baseis the base address of the ECAP module.

This function returns the time base counter value.

Returns
Returns the time base counter value.

◆ ECAP_getEventTimeStamp()

static uint32_t ECAP_getEventTimeStamp ( uint32_t  base,
ECAP_Events  event 
)
inlinestatic

Returns event time stamp.

Parameters
baseis the base address of the ECAP module.
eventis the event number.

This function returns the current time stamp count of the given event. Valid values for event are ECAP_EVENT_1 to ECAP_EVENT_4.

Returns
Event time stamp value or 0 if event is invalid.

◆ ECAP_selectECAPInput()

static void ECAP_selectECAPInput ( uint32_t  base,
ECAP_InputCaptureSignals  input 
)
inlinestatic

Select eCAP input.

Parameters
baseis the base address of the ECAP module.
inputis the eCAP input signal.

This function selects the eCAP input signal.

Please refer to the ECAP_InputCaptureSignals Enum for the valid values to be passed to input parameter.

Returns
None.

◆ ECAP_resetCounters()

static void ECAP_resetCounters ( uint32_t  base)
inlinestatic

Resets eCAP counters and flags.

Parameters
baseis the base address of the ECAP module.

This function resets the main counter (TSCTR register), event filter, modulo counter, capture events and counter overflow flags

Returns
None.

◆ ECAP_setDMASource()

static void ECAP_setDMASource ( uint32_t  base,
ECAP_Events  event 
)
inlinestatic

Sets the eCAP DMA source.

Parameters
baseis the base address of the ECAP module.
eventis the eCAP event for the DMA

This function sets the eCAP event source for the DMA trigger. Valid values for event are ECAP_EVENT_1 to ECAP_EVENT_4.

Returns
None.

◆ ECAP_getModuloCounterStatus()

static ECAP_Events ECAP_getModuloCounterStatus ( uint32_t  base)
inlinestatic

Return the Modulo counter status.

Parameters
baseis the base address of the ECAP module.

This function returns the modulo counter status, indicating which register gets loaded on the next capture event.

Returns
Returns an ECAP_EVENT_n value indicating that CAPn is the register to be loaded on the next event.

◆ HRCAP_enableHighResolution()

static void HRCAP_enableHighResolution ( uint32_t  base)
inlinestatic

Enables HRCAP.

Parameters
baseis the base address of the ECAP instance used.

This function enables High Resolution Capture module.

Note
High resolution clock must be enabled before High Resolution Module is enabled.
Returns
None.

◆ HRCAP_disableHighResolution()

static void HRCAP_disableHighResolution ( uint32_t  base)
inlinestatic

Disables HRCAP.

Parameters
baseis the base address of the HRCAP instance used.

This function disable High Resolution Capture module.

Returns
None.

◆ HRCAP_enableHighResolutionClock()

static void HRCAP_enableHighResolutionClock ( uint32_t  base)
inlinestatic

Enables high resolution clock.

Parameters
baseis the base address of the HRCAP instance used.

This function enables High Resolution clock.

Returns
None.

◆ HRCAP_disbleHighResolutionClock()

static void HRCAP_disbleHighResolutionClock ( uint32_t  base)
inlinestatic

Disables High resolution clock.

Parameters
baseis the base address of the HRCAP instance used.

This function disables High Resolution clock.

Returns
None.

◆ HRCAP_startCalibration()

static void HRCAP_startCalibration ( uint32_t  base)
inlinestatic

Starts calibration.

Parameters
baseis the base address of the HRCAP instance used.

This function starts calibration.

Returns
None.

◆ HRCAP_setCalibrationMode()

static void HRCAP_setCalibrationMode ( uint32_t  base)
inlinestatic

Sets the calibration mode.

Parameters
baseis the base address of the HRCAP instance used.

This function sets the the calibration mode by turning on continuous calibration.

Returns
None.

◆ HRCAP_enableCalibrationInterrupt()

static void HRCAP_enableCalibrationInterrupt ( uint32_t  base,
uint16_t  intFlags 
)
inlinestatic

Enables calibration interrupt.

Parameters
baseis the base address of the HRCAP module.
intFlagsis the calibration interrupt flags to be enabled.

This function enables HRCAP calibration interrupt flags. Valid values for intFlags are:

  • HRCAP_CALIBRATION_DONE - Calibration done interrupt.
  • HRCAP_CALIBRATION_PERIOD_OVERFLOW - Calibration period overflow check interrupt.
    Returns
    None.

◆ HRCAP_disableCalibrationInterrupt()

static void HRCAP_disableCalibrationInterrupt ( uint32_t  base,
uint16_t  intFlags 
)
inlinestatic

Disables calibration interrupt source.

Parameters
baseis the base address of the HRCAP module.
intFlagsis the calibration interrupt flags to be disabled.

This function disables HRCAP calibration interrupt flags. Valid values for intFlags are:

  • HRCAP_CALIBRATION_DONE - Calibration done interrupt.
  • HRCAP_CALIBRATION_PERIOD_OVERFLOW - Calibration period check interrupt.
    Returns
    None.

◆ HRCAP_getCalibrationFlags()

static uint16_t HRCAP_getCalibrationFlags ( uint32_t  base)
inlinestatic

Returns the calibration interrupt source.

Parameters
baseis the base address of the HRCAP module.

This function returns the HRCAP calibration interrupt source.

Returns
Returns the HRCAP interrupt that has occurred. The following are valid return values.
  • HRCAP_GLOBAL_CALIBRATION_INTERRUPT - Global calibration interrupt.
  • HRCAP_CALIBRATION_DONE - Calibration done interrupt.
  • HRCAP_CALIBRATION_PERIOD_OVERFLOW - Calibration period overflow interrupt.
Note
- User can check if a combination of the interrupts have occurred by ORing the above return values.

◆ HRCAP_clearCalibrationFlags()

static void HRCAP_clearCalibrationFlags ( uint32_t  base,
uint16_t  flags 
)
inlinestatic

Clears calibration flags.

Parameters
baseis the base address of the HRCAP module.
flagsis the calibration flags to be cleared.

This function clears HRCAP calibration flags. The following are valid values for flags.

  • HRCAP_GLOBAL_CALIBRATION_INTERRUPT - Global calibration interrupt.
  • HRCAP_CALIBRATION_DONE - Calibration done flag.
  • HRCAP_CALIBRATION_PERIOD_OVERFLOW - Calibration period overflow flag.
Returns
None.

◆ HRCAP_isCalibrationBusy()

static bool HRCAP_isCalibrationBusy ( uint32_t  base)
inlinestatic

Return the Calibration status

Parameters
baseis the base address of the HRCAP instance used.

This function returns the calibration status.

Returns
This functions returns true if the calibration is in process,false if there is no active calibration.

◆ HRCAP_forceCalibrationFlags()

static void HRCAP_forceCalibrationFlags ( uint32_t  base,
uint16_t  flag 
)
inlinestatic

Force a software based calibration

Parameters
baseis the base address of the HRCAP instance used.
flagis the calibration flag source.

This function forces a software based calibration done flag. The following are valid values for flag.

  • HRCAP_CALIBRATION_DONE - Calibration done flag.
  • HRCAP_CALIBRATION_PERIOD_OVERFLOW - Calibration period overflow flag.
Returns
None.

◆ HRCAP_setCalibrationPeriod()

static void HRCAP_setCalibrationPeriod ( uint32_t  base,
uint32_t  sysclkHz 
)
inlinestatic

Sets the calibration period count

Parameters
baseis the base address of the HRCAP instance used.
sysclkHzis the rate of the SYSCLK in Hz.

This function sets the calibration period count value to achieve a period of 1.6 milliseconds given the SYSCLK frequency in Hz (the sysclkHz parameter).

Returns
None.

◆ HRCAP_getCalibrationClockPeriod()

static uint32_t HRCAP_getCalibrationClockPeriod ( uint32_t  base,
HRCAP_CalibrationClockSource  clockSource 
)
inlinestatic

Returns the calibration clock period

Parameters
baseis the base address of the HRCAP instance used.
clockSourceis the calibration clock source (HRCAP_CALIBRATION_CLOCK_SYSCLK or HRCAP_CALIBRATION_CLOCK_HRCLK).

This function returns the period match value of the calibration clock. The return value has a valid count when a period match occurs.

Returns
This function returns the captured value of the clock counter specified by clockSource.

◆ HRCAP_getScaleFactor()

static Float32 HRCAP_getScaleFactor ( uint32_t  base)
inlinestatic

Calculates the scale factor

Parameters
baseis the base address of the HRCAP instance used.

This function reads the SYSCLK and HRCLK calibration periods and then uses them to calculate the scale factor.

Returns
This function returns the calculated scale factor.

◆ HRCAP_convertEventTimeStampNanoseconds()

static Float32 HRCAP_convertEventTimeStampNanoseconds ( uint32_t  timeStamp,
Float32  scaleFactor 
)
inlinestatic

Returns event time stamp in nanoseconds

Parameters
timeStampis a raw time stamp count returned by ECAP_getEventTimeStamp().
scaleFactoris the calculated scale factor returned by HRCAP_getScaleFactor().

This function converts a raw CAP time stamp (the timeStamp parameter) to nanoseconds using the provided scale factor (the scaleFactor parameter).

Returns
Returns the converted time stamp in nanoseconds.

◆ ECAP_setEmulationMode()

void ECAP_setEmulationMode ( uint32_t  base,
ECAP_EmulationMode  mode 
)

Configures emulation mode.

Parameters
baseis the base address of the ECAP module.
modeis the emulation mode.

This function configures the eCAP counter, TSCTR, to the desired emulation mode when emulation suspension occurs. Valid inputs for mode are:

  • ECAP_EMULATION_STOP - Counter is stopped immediately.
  • ECAP_EMULATION_RUN_TO_ZERO - Counter runs till it reaches 0.
  • ECAP_EMULATION_FREE_RUN - Counter is not affected.
Returns
None.
ECAP_ISR_SOURCE_CAPTURE_EVENT_1
#define ECAP_ISR_SOURCE_CAPTURE_EVENT_1
Event 1 ISR source.
Definition: ecap/v1/ecap.h:83