This module contains APIs to program and use the ADC module.
Data Structures | |
struct | ADC_RepeaterConfig |
Functions | |
static void | ADC_setPrescaler (uint32_t base, ADC_ClkPrescale clkPrescale) |
static void | ADC_setupSOC (uint32_t base, ADC_SOCNumber socNumber, ADC_Trigger trigger, ADC_Channel channel, uint32_t sampleWindow) |
static void | ADC_selectSOCExtChannel (uint32_t base, ADC_SOCNumber socNumber, uint16_t extChannel) |
static void | ADC_forceRepeaterTrigger (uint32_t base, uint16_t repInstance) |
static uint16_t | ADC_getRepeaterStatus (uint32_t base, uint16_t repInstance) |
static void | ADC_setInterruptSOCTrigger (uint32_t base, ADC_SOCNumber socNumber, ADC_IntSOCTrigger trigger) |
static void | ADC_setInterruptPulseMode (uint32_t base, ADC_PulseMode pulseMode) |
static void | ADC_setInterruptCycleOffset (uint32_t base, uint16_t cycleOffset) |
static void | ADC_enableAltDMATiming (uint32_t base) |
static void | ADC_disableAltDMATiming (uint32_t base) |
static void | ADC_enableExtMuxPreselect (uint32_t base) |
static void | ADC_disableExtMuxPreselect (uint32_t base) |
static void | ADC_selectOffsetTrimMode (uint32_t base, ADC_OffsetTrim mode) |
static bool | ADC_getIntResultStatus (uint32_t base, ADC_IntNumber adcIntNum) |
static void | ADC_enableConverter (uint32_t base) |
static void | ADC_disableConverter (uint32_t base) |
static void | ADC_forceSOC (uint32_t base, ADC_SOCNumber socNumber) |
static void | ADC_forceMultipleSOC (uint32_t base, uint16_t socMask) |
static bool | ADC_getInterruptStatus (uint32_t base, ADC_IntNumber adcIntNum) |
static void | ADC_clearInterruptStatus (uint32_t base, ADC_IntNumber adcIntNum) |
static bool | ADC_getInterruptOverflowStatus (uint32_t base, ADC_IntNumber adcIntNum) |
static void | ADC_clearInterruptOverflowStatus (uint32_t base, ADC_IntNumber adcIntNum) |
static uint16_t | ADC_readResult (uint32_t resultBase, ADC_SOCNumber socNumber) |
static bool | ADC_isBusy (uint32_t base) |
static void | ADC_setBurstModeConfig (uint32_t base, ADC_Trigger trigger, uint16_t burstSize) |
static void | ADC_enableBurstMode (uint32_t base) |
static void | ADC_disableBurstMode (uint32_t base) |
static void | ADC_setSOCPriority (uint32_t base, ADC_PriorityMode priMode) |
static void | ADC_configOSDetectMode (uint32_t base, ADC_OSDetectMode modeVal) |
static void | ADC_setupPPB (uint32_t base, ADC_PPBNumber ppbNumber, ADC_SOCNumber socNumber) |
static void | ADC_enablePPBEvent (uint32_t base, ADC_PPBNumber ppbNumber, uint16_t evtFlags) |
static void | ADC_disablePPBEvent (uint32_t base, ADC_PPBNumber ppbNumber, uint16_t evtFlags) |
static void | ADC_enablePPBEventInterrupt (uint32_t base, ADC_PPBNumber ppbNumber, uint16_t intFlags) |
static void | ADC_disablePPBEventInterrupt (uint32_t base, ADC_PPBNumber ppbNumber, uint16_t intFlags) |
static uint16_t | ADC_getPPBEventStatus (uint32_t base, ADC_PPBNumber ppbNumber) |
static void | ADC_clearPPBEventStatus (uint32_t base, ADC_PPBNumber ppbNumber, uint16_t evtFlags) |
static void | ADC_enablePPBEventCBCClear (uint32_t base, ADC_PPBNumber ppbNumber) |
static void | ADC_disablePPBEventCBCClear (uint32_t base, ADC_PPBNumber ppbNumber) |
static void | ADC_setPPBCountLimit (uint32_t base, ADC_PPBNumber ppbNumber, uint16_t limit) |
static uint16_t | ADC_getPPBCountLimit (uint32_t base, ADC_PPBNumber ppbNumber) |
static uint16_t | ADC_readPPBPCount (uint32_t base, ADC_PPBNumber ppbNumber) |
static int32_t | ADC_readPPBPSum (uint32_t base, ADC_PPBNumber ppbNumber) |
static int32_t | ADC_readPPBPMax (uint32_t base, ADC_PPBNumber ppbNumber) |
static int32_t | ADC_readPPBPMin (uint32_t base, ADC_PPBNumber ppbNumber) |
static uint16_t | ADC_readPPBPMaxIndex (uint32_t base, ADC_PPBNumber ppbNumber) |
static uint16_t | ADC_readPPBPMinIndex (uint32_t base, ADC_PPBNumber ppbNumber) |
static void | ADC_enablePPBAbsoluteValue (uint32_t base, ADC_PPBNumber ppbNumber) |
static void | ADC_disablePPBAbsoluteValue (uint32_t base, ADC_PPBNumber ppbNumber) |
static void | ADC_setPPBShiftValue (uint32_t base, ADC_PPBNumber ppbNumber, uint16_t shiftVal) |
static void | ADC_selectPPBSyncInput (uint32_t base, ADC_PPBNumber ppbNumber, uint16_t syncInput) |
static void | ADC_forcePPBSync (uint32_t base, ADC_PPBNumber ppbNumber) |
static void | ADC_selectPPBOSINTSource (uint32_t base, ADC_PPBNumber ppbNumber, uint16_t osIntSrc) |
static void | ADC_selectPPBCompareSource (uint32_t base, ADC_PPBNumber ppbNumber, uint16_t compSrc) |
static int32_t | ADC_readPPBSum (uint32_t resultBase, ADC_PPBNumber ppbNumber) |
static uint32_t | ADC_readPPBCount (uint32_t resultBase, ADC_PPBNumber ppbNumber) |
static int32_t | ADC_readPPBMax (uint32_t resultBase, ADC_PPBNumber ppbNumber) |
static int32_t | ADC_readPPBMin (uint32_t resultBase, ADC_PPBNumber ppbNumber) |
static uint16_t | ADC_readPPBMaxIndex (uint32_t resultBase, ADC_PPBNumber ppbNumber) |
static uint16_t | ADC_readPPBMinIndex (uint32_t resultBase, ADC_PPBNumber ppbNumber) |
static int32_t | ADC_readPPBResult (uint32_t resultBase, ADC_PPBNumber ppbNumber) |
static uint16_t | ADC_getPPBDelayTimeStamp (uint32_t base, ADC_PPBNumber ppbNumber) |
static void | ADC_setPPBCalibrationOffset (uint32_t base, ADC_PPBNumber ppbNumber, int16_t offset) |
static void | ADC_setPPBReferenceOffset (uint32_t base, ADC_PPBNumber ppbNumber, uint16_t offset) |
static void | ADC_enablePPBTwosComplement (uint32_t base, ADC_PPBNumber ppbNumber) |
static void | ADC_disablePPBTwosComplement (uint32_t base, ADC_PPBNumber ppbNumber) |
static void | ADC_enablePPBExtendedLowLimit (uint32_t base, ADC_PPBNumber ppbNumber) |
static void | ADC_disablePPBExtendedLowLimit (uint32_t base, ADC_PPBNumber ppbNumber) |
static void | ADC_enableInterrupt (uint32_t base, ADC_IntNumber adcIntNum) |
static void | ADC_disableInterrupt (uint32_t base, ADC_IntNumber adcIntNum) |
static void | ADC_setInterruptSource (uint32_t base, ADC_IntNumber adcIntNum, uint16_t intTrigger) |
static void | ADC_enableContinuousMode (uint32_t base, ADC_IntNumber adcIntNum) |
static void | ADC_disableContinuousMode (uint32_t base, ADC_IntNumber adcIntNum) |
static void | ADC_configSOCSafetyCheckerInput (uint32_t base, ADC_SOCNumber socNumber, ADC_SafetyCheckerInput scInput) |
static void | ADC_enableSafetyChecker (uint32_t scBase) |
static void | ADC_disableSafetyChecker (uint32_t scBase) |
static void | ADC_forceSafetyCheckerSync (uint32_t scBase) |
static uint16_t | ADC_getSafetyCheckerStatus (uint32_t scBase) |
static void | ADC_configureSafetyChecker (uint32_t scBase, ADC_SafetyCheckInst checkInst, ADC_Select adcInst, ADC_ResultSelect adcResultInst) |
static void | ADC_setSafetyCheckerTolerance (uint32_t scBase, uint32_t tolerance) |
static uint32_t | ADC_getSafetyCheckerResult (uint32_t scBase, ADC_SafetyCheckInst checkInst) |
static void | ADC_enableSafetyCheckEvt (uint32_t scIntEvtBase, ADC_Checker checkerNumber, ADC_SafetyCheckEvent checkEvent, ADC_SafetyCheckResult checkResult) |
static void | ADC_disableSafetyCheckEvt (uint32_t scIntEvtBase, ADC_Checker checkerNumber, ADC_SafetyCheckEvent checkEvent, ADC_SafetyCheckResult checkResult) |
static void | ADC_enableSafetyCheckInt (uint32_t scIntEvtBase, ADC_Checker checkerNumber, ADC_SafetyCheckResult checkResult) |
static void | ADC_disableSafetyCheckInt (uint32_t scIntEvtBase, ADC_Checker checkerNumber, ADC_SafetyCheckResult checkResult) |
static bool | ADC_getSafetyCheckStatus (uint32_t scIntEvtBase, ADC_Checker checkerNumber, ADC_SafetyCheckFlag checkerFlag) |
static void | ADC_clearSafetyCheckStatus (uint32_t scIntEvtBase, ADC_Checker checkerNumber, ADC_SafetyCheckFlag checkerFlag) |
static uint32_t | ADC_getSafetyCheckIntStatus (uint32_t scIntEvtBase) |
static void | ADC_clearSafetyCheckIntStatus (uint32_t scIntEvtBase) |
static void | ADC_triggerRepeaterMode (uint32_t base, uint32_t repInstance, ADC_RepMode mode) |
static bool | ADC_triggerRepeaterActiveMode (uint32_t base, uint32_t repInstance) |
static bool | ADC_triggerRepeaterModuleBusy (uint32_t base, uint32_t repInstance) |
static void | ADC_triggerRepeaterSelect (uint32_t base, uint16_t repInstance, ADC_Trigger trigger) |
static void | ADC_triggerRepeaterSyncIn (uint32_t base, uint16_t repInstance, ADC_SyncInput syncInput) |
static void | ADC_forceRepeaterTriggerSync (uint32_t base, uint16_t repInstance) |
static void | ADC_triggerRepeaterCount (uint32_t base, uint16_t repInstance, uint16_t repCount) |
static void | ADC_triggerRepeaterPhase (uint32_t base, uint16_t repInstance, uint16_t repPhase) |
static void | ADC_triggerRepeaterSpread (uint32_t base, uint16_t repInstance, uint16_t repSpread) |
void | ADC_setMode (uint32_t base, ADC_Resolution resolution, ADC_SignalMode signalMode) |
void | ADC_setPPBTripLimits (uint32_t base, ADC_PPBNumber ppbNumber, int32_t tripHiLimit, int32_t tripLoLimit) |
Macros | |
#define | ADC_ADCSOCxCTL_STEP (CSL_ADC_ADCSOC1CTL - CSL_ADC_ADCSOC0CTL) |
Header Files. More... | |
#define | ADC_ADCSOCxCTL_STEP (CSL_ADC_ADCSOC1CTL - CSL_ADC_ADCSOC0CTL) |
Header Files. More... | |
#define | ADC_ADCINTSELxNy_STEP (CSL_ADC_ADCINTSEL3N4 - CSL_ADC_ADCINTSEL1N2) |
Register offset difference between 2 ADCINTSELxNy registers. More... | |
#define | ADC_ADCINTSELxNy_STEP (CSL_ADC_ADCINTSEL3N4 - CSL_ADC_ADCINTSEL1N2) |
Register offset difference between 2 ADCINTSELxNy registers. More... | |
#define | ADC_ADCPPBx_STEP (CSL_ADC_ADCPPB2CONFIG - CSL_ADC_ADCPPB1CONFIG) |
Register offset difference between 2 ADCPPBxCONFIG registers. More... | |
#define | ADC_ADCPPBx_STEP (CSL_ADC_ADCPPB2CONFIG - CSL_ADC_ADCPPB1CONFIG) |
Register offset difference between 2 ADCPPBxCONFIG registers. More... | |
#define | ADC_ADCPPBTRIP_MASK |
ADC PPB Trip Mask. More... | |
#define | ADC_ADCPPBTRIP_MASK |
ADC PPB Trip Mask. More... | |
#define | ADC_RESULT_ADCPPBxRESULT_STEP |
Register offset difference between 2 ADCPPBxRESULT registers. More... | |
#define | ADC_RESULT_ADCPPBxRESULT_STEP |
Register offset difference between 2 ADCPPBxRESULT registers. More... | |
#define | ADC_RESULT_ADCRESULTx_STEP |
Register offset difference between 2 ADCRESULTx registers. More... | |
#define | ADC_RESULT_ADCRESULTx_STEP |
Register offset difference between 2 ADCRESULTx registers. More... | |
#define | ADC_REPCTL_MASK |
#define | ADC_ADCPPBxCONFIG2_STEP (CSL_ADC_ADCPPB2CONFIG2 - CSL_ADC_ADCPPB1CONFIG2) |
Register offset difference between 2 ADCPPBxLIMIT registers. More... | |
#define | ADC_ADCPPBxCONFIG2_STEP (CSL_ADC_ADCPPB2CONFIG2 - CSL_ADC_ADCPPB1CONFIG2) |
Register offset difference between 2 ADCPPBxLIMIT registers. More... | |
#define | ADC_REPxCTL_STEP (CSL_ADC_REP2CTL - CSL_ADC_REP1CTL) |
#define | ADC_REPxN_STEP (CSL_ADC_REP2N - CSL_ADC_REP1N) |
#define | ADC_REPxPHASE_STEP (CSL_ADC_REP2PHASE - CSL_ADC_REP1PHASE) |
#define | ADC_REPxSPREAD_STEP (CSL_ADC_REP2SPREAD - CSL_ADC_REP1SPREAD) |
#define | ADC_PPBxTRIPHI_STEP (CSL_ADC_ADCPPB1TRIPHI - CSL_ADC_ADCPPB1TRIPHI) |
#define | ADC_PPBxTRIPLO_STEP (CSL_ADC_ADCPPB2TRIPLO - CSL_ADC_ADCPPB1TRIPLO) |
#define | ADC_ADCPPBxLIMIT_STEP (CSL_ADC_ADCPPB2LIMIT - CSL_ADC_ADCPPB1LIMIT) |
#define | ADC_ADCPPBxPCOUNT_STEP (CSL_ADC_ADCPPBP2PCOUNT - CSL_ADC_ADCPPBP1PCOUNT) |
#define | ADC_ADCPPBxPSUM_STEP (CSL_ADC_ADCPPB2PSUM - CSL_ADC_ADCPPB1PSUM) |
#define | ADC_ADCPPBxPMAX_STEP (CSL_ADC_ADCPPB2PMAX - CSL_ADC_ADCPPB1PMAX) |
#define | ADC_ADCPPBxPMAXI_STEP (CSL_ADC_ADCPPB2PMAXI - CSL_ADC_ADCPPB1PMAXI) |
#define | ADC_ADCPPBxPMIN_STEP (CSL_ADC_ADCPPB2PMIN - CSL_ADC_ADCPPB1PMIN) |
#define | ADC_ADCPPBxPMINI_STEP (CSL_ADC_ADCPPB2PMINI - CSL_ADC_ADCPPB1PMINI) |
#define | ADC_ADCPPBxTRIPLO2_STEP (CSL_ADC_ADCPPB2TRIPLO2 - CSL_ADC_ADCPPB1TRIPLO2) |
#define | ADC_REPSTATUS_MASK |
#define | ADC_SAFECHECK_STATUS_MASK |
#define | ADC_EVT_TRIPHI (0x0001U) |
Trip High Event. More... | |
#define | ADC_EVT_TRIPLO (0x0002U) |
Trip Low Event. More... | |
#define | ADC_EVT_ZERO (0x0004U) |
Zero Crossing Event. More... | |
#define | ADC_FORCE_SOC0 (0x0001U) |
SW trigger ADC SOC 0. More... | |
#define | ADC_FORCE_SOC1 (0x0002U) |
SW trigger ADC SOC 1. More... | |
#define | ADC_FORCE_SOC2 (0x0004U) |
SW trigger ADC SOC 2. More... | |
#define | ADC_FORCE_SOC3 (0x0008U) |
SW trigger ADC SOC 3. More... | |
#define | ADC_FORCE_SOC4 (0x0010U) |
SW trigger ADC SOC 4. More... | |
#define | ADC_FORCE_SOC5 (0x0020U) |
SW trigger ADC SOC 5. More... | |
#define | ADC_FORCE_SOC6 (0x0040U) |
SW trigger ADC SOC 6. More... | |
#define | ADC_FORCE_SOC7 (0x0080U) |
SW trigger ADC SOC 7. More... | |
#define | ADC_FORCE_SOC8 (0x0100U) |
SW trigger ADC SOC 8. More... | |
#define | ADC_FORCE_SOC9 (0x0200U) |
SW trigger ADC SOC 9. More... | |
#define | ADC_FORCE_SOC10 (0x0400U) |
SW trigger ADC SOC 10. More... | |
#define | ADC_FORCE_SOC11 (0x0800U) |
SW trigger ADC SOC 11. More... | |
#define | ADC_FORCE_SOC12 (0x1000U) |
SW trigger ADC SOC 12. More... | |
#define | ADC_FORCE_SOC13 (0x2000U) |
SW trigger ADC SOC 13. More... | |
#define | ADC_FORCE_SOC14 (0x4000U) |
SW trigger ADC SOC 14. More... | |
#define | ADC_FORCE_SOC15 (0x8000U) |
SW trigger ADC SOC 15. More... | |
#define ADC_ADCSOCxCTL_STEP (CSL_ADC_ADCSOC1CTL - CSL_ADC_ADCSOC0CTL) |
Header Files.
Defines used by the driver.
Defines used by the driver Register offset difference between 2 ADCSOCxCTL registers
Register offset difference between 2 ADCSOCxCTL registers
#define ADC_ADCSOCxCTL_STEP (CSL_ADC_ADCSOC1CTL - CSL_ADC_ADCSOC0CTL) |
Header Files.
Defines used by the driver.
Defines used by the driver Register offset difference between 2 ADCSOCxCTL registers
Register offset difference between 2 ADCSOCxCTL registers
#define ADC_ADCINTSELxNy_STEP (CSL_ADC_ADCINTSEL3N4 - CSL_ADC_ADCINTSEL1N2) |
Register offset difference between 2 ADCINTSELxNy registers.
#define ADC_ADCINTSELxNy_STEP (CSL_ADC_ADCINTSEL3N4 - CSL_ADC_ADCINTSEL1N2) |
Register offset difference between 2 ADCINTSELxNy registers.
#define ADC_ADCPPBx_STEP (CSL_ADC_ADCPPB2CONFIG - CSL_ADC_ADCPPB1CONFIG) |
Register offset difference between 2 ADCPPBxCONFIG registers.
#define ADC_ADCPPBx_STEP (CSL_ADC_ADCPPB2CONFIG - CSL_ADC_ADCPPB1CONFIG) |
Register offset difference between 2 ADCPPBxCONFIG registers.
#define ADC_ADCPPBTRIP_MASK |
ADC PPB Trip Mask.
#define ADC_ADCPPBTRIP_MASK |
ADC PPB Trip Mask.
#define ADC_RESULT_ADCPPBxRESULT_STEP |
Register offset difference between 2 ADCPPBxRESULT registers.
#define ADC_RESULT_ADCPPBxRESULT_STEP |
Register offset difference between 2 ADCPPBxRESULT registers.
#define ADC_RESULT_ADCRESULTx_STEP |
Register offset difference between 2 ADCRESULTx registers.
#define ADC_RESULT_ADCRESULTx_STEP |
Register offset difference between 2 ADCRESULTx registers.
#define ADC_REPCTL_MASK |
#define ADC_ADCPPBxCONFIG2_STEP (CSL_ADC_ADCPPB2CONFIG2 - CSL_ADC_ADCPPB1CONFIG2) |
Register offset difference between 2 ADCPPBxLIMIT registers.
#define ADC_ADCPPBxCONFIG2_STEP (CSL_ADC_ADCPPB2CONFIG2 - CSL_ADC_ADCPPB1CONFIG2) |
Register offset difference between 2 ADCPPBxLIMIT registers.
#define ADC_REPxCTL_STEP (CSL_ADC_REP2CTL - CSL_ADC_REP1CTL) |
#define ADC_REPxN_STEP (CSL_ADC_REP2N - CSL_ADC_REP1N) |
#define ADC_REPxPHASE_STEP (CSL_ADC_REP2PHASE - CSL_ADC_REP1PHASE) |
#define ADC_REPxSPREAD_STEP (CSL_ADC_REP2SPREAD - CSL_ADC_REP1SPREAD) |
#define ADC_PPBxTRIPHI_STEP (CSL_ADC_ADCPPB1TRIPHI - CSL_ADC_ADCPPB1TRIPHI) |
#define ADC_PPBxTRIPLO_STEP (CSL_ADC_ADCPPB2TRIPLO - CSL_ADC_ADCPPB1TRIPLO) |
#define ADC_ADCPPBxLIMIT_STEP (CSL_ADC_ADCPPB2LIMIT - CSL_ADC_ADCPPB1LIMIT) |
#define ADC_ADCPPBxPCOUNT_STEP (CSL_ADC_ADCPPBP2PCOUNT - CSL_ADC_ADCPPBP1PCOUNT) |
#define ADC_ADCPPBxPSUM_STEP (CSL_ADC_ADCPPB2PSUM - CSL_ADC_ADCPPB1PSUM) |
#define ADC_ADCPPBxPMAX_STEP (CSL_ADC_ADCPPB2PMAX - CSL_ADC_ADCPPB1PMAX) |
#define ADC_ADCPPBxPMAXI_STEP (CSL_ADC_ADCPPB2PMAXI - CSL_ADC_ADCPPB1PMAXI) |
#define ADC_ADCPPBxPMIN_STEP (CSL_ADC_ADCPPB2PMIN - CSL_ADC_ADCPPB1PMIN) |
#define ADC_ADCPPBxPMINI_STEP (CSL_ADC_ADCPPB2PMINI - CSL_ADC_ADCPPB1PMINI) |
#define ADC_ADCPPBxTRIPLO2_STEP (CSL_ADC_ADCPPB2TRIPLO2 - CSL_ADC_ADCPPB1TRIPLO2) |
#define ADC_REPSTATUS_MASK |
#define ADC_SAFECHECK_STATUS_MASK |
#define ADC_EVT_TRIPHI (0x0001U) |
Trip High Event.
#define ADC_EVT_TRIPLO (0x0002U) |
Trip Low Event.
#define ADC_EVT_ZERO (0x0004U) |
Zero Crossing Event.
#define ADC_FORCE_SOC0 (0x0001U) |
SW trigger ADC SOC 0.
#define ADC_FORCE_SOC1 (0x0002U) |
SW trigger ADC SOC 1.
#define ADC_FORCE_SOC2 (0x0004U) |
SW trigger ADC SOC 2.
#define ADC_FORCE_SOC3 (0x0008U) |
SW trigger ADC SOC 3.
#define ADC_FORCE_SOC4 (0x0010U) |
SW trigger ADC SOC 4.
#define ADC_FORCE_SOC5 (0x0020U) |
SW trigger ADC SOC 5.
#define ADC_FORCE_SOC6 (0x0040U) |
SW trigger ADC SOC 6.
#define ADC_FORCE_SOC7 (0x0080U) |
SW trigger ADC SOC 7.
#define ADC_FORCE_SOC8 (0x0100U) |
SW trigger ADC SOC 8.
#define ADC_FORCE_SOC9 (0x0200U) |
SW trigger ADC SOC 9.
#define ADC_FORCE_SOC10 (0x0400U) |
SW trigger ADC SOC 10.
#define ADC_FORCE_SOC11 (0x0800U) |
SW trigger ADC SOC 11.
#define ADC_FORCE_SOC12 (0x1000U) |
SW trigger ADC SOC 12.
#define ADC_FORCE_SOC13 (0x2000U) |
SW trigger ADC SOC 13.
#define ADC_FORCE_SOC14 (0x4000U) |
SW trigger ADC SOC 14.
#define ADC_FORCE_SOC15 (0x8000U) |
SW trigger ADC SOC 15.
enum ADC_ClkPrescale |
Values that can be passed to ADC_setPrescaler() as the clkPrescale parameter.
enum ADC_Resolution |
Values that can be passed to ADC_setMode() as the resolution parameter.
Enumerator | |
---|---|
ADC_RESOLUTION_12BIT | 12-bit conversion resolution |
enum ADC_SignalMode |
Values that can be passed to ADC_setMode() as the signalMode parameter.
Enumerator | |
---|---|
ADC_MODE_SINGLE_ENDED | Sample on single pin with VREFLO. |
ADC_MODE_DIFFERENTIAL | Sample on pair of pins. |
enum ADC_Trigger |
Values that can be passed to ADC_setupSOC() as the trigger parameter to specify the event that will trigger a conversion to start. It is also used with ADC_setBurstModeConfig().
enum ADC_Channel |
Values that can be passed to ADC_setupSOC() as the channel parameter. This is the input pin on which the signal to be converted is located.
enum ADC_PulseMode |
Values that can be passed to ADC_setInterruptPulseMode() as the pulseMode parameter.
Enumerator | |
---|---|
ADC_PULSE_END_OF_ACQ_WIN | Occurs at the end of the acquisition window. |
ADC_PULSE_END_OF_CONV | Occurs at the end of the conversion. |
enum ADC_IntNumber |
Values that can be passed to ADC_enableInterrupt(), ADC_disableInterrupt(), ADC_clearInterruptStatus(), ADC_getInterruptOverflowStatus(), ADC_clearInterruptOverflowStatus(), ADC_setInterruptSource(), ADC_enableContinuousMode(), ADC_disableContinuousMode() and ADC_getInterruptStatus() as the adcIntNum parameter.
Enumerator | |
---|---|
ADC_INT_NUMBER1 | ADCINT1 Interrupt. |
ADC_INT_NUMBER2 | ADCINT2 Interrupt. |
ADC_INT_NUMBER3 | ADCINT3 Interrupt. |
ADC_INT_NUMBER4 | ADCINT4 Interrupt. |
enum ADC_PPBNumber |
enum ADC_SOCNumber |
Values that can be passed in as the socNumber parameter for several functions. This value identifies the start-of-conversion (SOC) that a function is configuring or accessing. Note that in some cases (for example, ADC_setInterruptSource()) socNumber is used to refer to the corresponding end-of-conversion (EOC).
enum ADC_IntSOCTrigger |
Values that can be passed in as the trigger parameter for the ADC_setInterruptSOCTrigger() function.
Enumerator | |
---|---|
ADC_INT_SOC_TRIGGER_NONE | No ADCINT will trigger the SOC. |
ADC_INT_SOC_TRIGGER_ADCINT1 | ADCINT1 will trigger the SOC. |
ADC_INT_SOC_TRIGGER_ADCINT2 | ADCINT2 will trigger the SOC. |
enum ADC_PriorityMode |
Values that can be passed to ADC_setSOCPriority() as the priMode parameter.
enum ADC_OSDetectMode |
Values that can be passed to ADC_configOSDetectMode() as the modeVal parameter.
enum ADC_OffsetTrim |
Values that can be passed to ADC_selectOffsetTrimMode() as the mode parameter.
Enumerator | |
---|---|
ADC_OFFSET_TRIM_COMMON | Common Trim register for all ADC modes |
ADC_OFFSET_TRIM_INDIVIDUAL | Individual Trim registers for different ADC modes |
enum ADC_SyncInput |
enum ADC_PPBIntSrcSelect |
Values that can be passed to ADC_selectPPBOSINTSource() as the osIntSrc parameter.
Enumerator | |
---|---|
ADC_PPB_OS_INT_1 | PCount generates PPB interrupt. |
ADC_PPB_OS_INT_2 | PCount/Sync generates PPB interrupt. |
enum ADC_ExtChannel |
Values that can be passed to ADC_selectSOCExtChannel() as the extChannel parameter.
Enumerator | |
---|---|
ADC_CH_ADCINX_0 | ADCINX.0 is converted. |
ADC_CH_ADCINX_1 | ADCINX.1 is converted. |
ADC_CH_ADCINX_2 | ADCINX.2 is converted. |
ADC_CH_ADCINX_3 | ADCINX.3 is converted. |
enum ADC_IntTrigger |
Values that can be passed to ADC_setInterruptSource() as the intTrigger parameter.
enum ADC_PPBCompSource |
Values that can be passed to ADC_selectPPBCompareSource() as the compSrc parameter.
Enumerator | |
---|---|
ADC_PPB_COMPSOURCE_RESULT | PPB compare source is ADCRESULT. |
ADC_PPB_COMPSOURCE_PSUM | PPB compare source is PSUM. |
ADC_PPB_COMPSOURCE_SUM | PPB compare source is SUM. |
enum ADC_Select |
Values that can be passed to ADC_configureSafetyChecker() as the adcInst parameter.
Enumerator | |
---|---|
ADC_0 | Select ADC0 instance. |
ADC_1 | Select ADC1 instance. |
ADC_2 | Select ADC2 instance. |
ADC_3 | Select ADC3 instance. |
ADC_4 | Select ADC4 instance. |
enum ADC_ResultSelect |
Values that can be passed to ADC_configureSafetyChecker() as the adcResultInst parameter.
Values that can be passed to ADC_configSOCSafetyCheckerInput() as the scInput parameter.
enum ADC_SafetyCheckInst |
Values that can be passed to ADC_getSafetyCheckerResult() as checkInst parameter.
Enumerator | |
---|---|
ADC_SAFETY_CHECK1 | Safety Check Result 1. |
ADC_SAFETY_CHECK2 | Safety Check Result 2. |
enum ADC_SafetyCheckEvent |
Values that can be passed to ADC_enableSafetyCheckEvt() and ADC_disableSafetyCheckEvt() as checkEvent parameter.
Enumerator | |
---|---|
ADC_SAFETY_CHECK_EVENT1 | Safety Check Event 1. |
ADC_SAFETY_CHECK_EVENT2 | Safety Check Event 2. |
ADC_SAFETY_CHECK_EVENT3 | Safety Check Event 3. |
ADC_SAFETY_CHECK_EVENT4 | Safety Check Event 4. |
Values that can be passed to ADC_enableSafetyCheckEvt(), ADC_disableSafetyCheckEvt(), ADC_enableSafetyCheckInt() and ADC_disableSafetyCheckInt() as checkResult parameter.
Enumerator | |
---|---|
ADC_SAFETY_CHECK_RES1OVF | Safety Check Result1 Overflow. |
ADC_SAFETY_CHECK_RES2OVF | Safety Check Result2 Overflow. |
ADC_SAFETY_CHECK_OOT | Safety Check OOT. |
enum ADC_Checker |
Values that can be passed to ADC_enableSafetyCheckEvt(), ADC_disableSafetyCheckEvt(), ADC_enableSafetyCheckInt(), ADC_disableSafetyCheckInt(), ADC_getSafetyCheckStatus(), ADC_clearSafetyCheckStatus(), ADC_getSafetyCheckIntStatus() and ADC_clearSafetyCheckIntStatus() as checkerNumber parameter.
enum ADC_SafetyCheckFlag |
Values that can be passed to ADC_getSafetyCheckStatus() and ADC_clearSafetyCheckStatus(), as checkerFlag parameter.
enum ADC_RepInstance |
enum ADC_RepMode |
Values that can be passed to ADC_configureRepeater() as the config.repMode and ADC_triggerRepeaterMode() as mode parameter.
Enumerator | |
---|---|
ADC_REPMODE_OVERSAMPLING | ADC repeater mode is oversampling. |
ADC_REPMODE_UNDERSAMPLING | ADC repeater mode is undersampling. |
|
inlinestatic |
Configures the analog-to-digital converter module prescaler.
base | is the base address of the ADC module. |
clkPrescale | is the ADC clock prescaler. |
This function configures the ADC module's ADCCLK.
The clkPrescale parameter specifies the value by which the input clock is divided to make the ADCCLK. The clkPrescale value can be specified with any of the following variables: ADC_CLK_DIV_1_0, ADC_CLK_DIV_2_0, ADC_CLK_DIV_2_5, ..., ADC_CLK_DIV_7_5, ADC_CLK_DIV_8_0, or ADC_CLK_DIV_8_5.
|
inlinestatic |
Configures a start-of-conversion (SOC) in the ADC.
base | is the base address of the ADC module. |
socNumber | is the number of the start-of-conversion. |
trigger | the source that will cause the SOC. |
channel | is the number associated with the input signal. |
sampleWindow | is the acquisition window duration. |
This function configures the a start-of-conversion (SOC) in the ADC module.
The socNumber number is a value ADC_SOC_NUMBERX where X is a number from 0 to 15 specifying which SOC is to be configured on the ADC module specified by base.
The trigger specifies the event that causes the SOC such as software, a timer interrupt, an ePWM event, or an ADC interrupt. It should be a value in the format of ADC_TRIGGER_XXXX where XXXX is the event such as ADC_TRIGGER_SW_ONLY, ADC_TRIGGER_EPWM1_SOCA, and so on.
The channel parameter specifies the channel to be converted. In single-ended mode this is a single pin given by ADC_CH_ADCINx where x is the number identifying the pin between 0 and 5 inclusive. In differential mode, two pins are used as inputs and are passed in the channel parameter as ADC_CH_ADCIN0_ADCIN1, ADC_CH_ADCIN2_ADCIN3, ..., or ADC_CH_ADCIN14_ADCIN5.
The sampleWindow parameter is the acquisition window duration in SYSCLK cycles. It should be a value between 1 and 512 cycles inclusive. The selected duration must be at least as long as one ADCCLK cycle. Also, the datasheet will specify a minimum window duration requirement in nanoseconds.
|
inlinestatic |
Configures the external channel mux for an ADC SOC.
base | is the base address of the ADC module. |
socNumber | is the number of the start-of-conversion. |
extChannel | is the desired external channel. |
This function configures the external channel for an SOC by configuring the external channel mux for an SOC.
The socNumber number is a value ADC_SOC_NUMBERX where X is a number from 0 to 15 specifying which SOC is to be configured on the ADC module specified by base.
The extChannel is the desired external channel. Valid values can be refered from the enum ADC_ExtChannel.
|
inlinestatic |
Forces software trigger to ADC trigger repeater block
base | is the base address of the ADC module. |
repInstance | is the repeater instance to be triggered. |
This function forces the selected ADC repeater block.
Valid values for repInstance parameter can be any of the individual ADC_REPEATER_INSTANCEx values defined by enum ADC_RepInstance.
|
inlinestatic |
Gets the current status for repeater block.
base | is the base address of the ADC module. |
repInstance | is the repeater instance |
This function returns the current status for the repeater block.
|
inlinestatic |
Configures the interrupt SOC trigger of an SOC.
base | is the base address of the ADC module. |
socNumber | is the number of the start-of-conversion. |
trigger | the interrupt source that will cause the SOC. |
This function configures the interrupt start-of-conversion trigger in the ADC module.
The socNumber number is a value ADC_SOC_NUMBERX where X is a number from 0 to 15 specifying which SOC is to be configured on the ADC module specified by base.
The trigger specifies the interrupt that causes a start of conversion or none. It should be one of the following values.
This functionality is useful for creating continuous conversions.
|
inlinestatic |
Sets the timing of the end-of-conversion pulse
base | is the base address of the ADC module. |
pulseMode | is the generation mode of the EOC pulse. |
This function configures the end-of-conversion (EOC) pulse generated by ADC. This pulse will be generated either at the end of the acquisition window plus a number of SYSCLK cycles configured by ADC_setInterruptCycleOffset() (pass ADC_PULSE_END_OF_ACQ_WIN into pulseMode) or at the end of the voltage conversion, one cycle prior to the ADC result latching into it's result register (pass ADC_PULSE_END_OF_CONV into pulseMode).
|
inlinestatic |
Sets the timing of early interrupt generation.
base | is the base address of the ADC module. |
cycleOffset | is the cycles from an SOC falling edge to an early interrupt pulse. |
This function configures cycle offset between the negative edge of a sample pulse and an early interrupt pulse being generated. This number of cycles is specified with the cycleOffset parameter.
This function only applies when early interrupt generation is enabled. That means the ADC_setInterruptPulseMode() function pulseMode parameter is configured as ADC_PULSE_END_OF_ACQ_WIN.
|
inlinestatic |
Enables alternate timings for DMA trigger
base | is the base address of the ADC module. |
This function enables the alternate timings(tDMA) for DMA trigger. When enabled the DMA is always triggered at tDMA regardless of whether the ADC is in early interrupt mode or late interrupt mode.
|
inlinestatic |
Disables alternate timings for DMA trigger
base | is the base address of the ADC module. |
This function disables the alternate timings(tDMA) for DMA trigger. When disabled the DMA is triggered at the same time as the CPU interrupt.
|
inlinestatic |
Enables external channel mux preselection
base | is the base address of the ADC module. |
This function enables the preselection of external mux pins which is at the end of the S+H window of the previous conversion. This preselection allows some of the external mux settling time to be pipelined with previous conversion's conversion time and can be enabled if ADC SOC sequence is deterministic.
|
inlinestatic |
Disables external mux preselection
base | is the base address of the ADC module. |
This function disables the preselection of external mux pins as in ADCEXTMUX pins can only change at the beginning of S+H window of current conversion.
|
inlinestatic |
Selects the offset trim mode
base | is the base address of the ADC module. |
mode | is the offset trim mode to be selected. |
This function configures the offset trim mode for an ADC instance. This means that the offset trim to be used for an ADC mode would be specified by the mode parameter. Valid values for mode parameter are:
|
inlinestatic |
Gets the result ready status for ADC interrupt.
base | is the base address of the ADC module. |
adcIntNum | is interrupt number within the ADC wrapper. |
This function returns the result ready status associated with the selected interrupt number within the ADC wrapper.
adcIntNum takes a one of the values ADC_INT_NUMBER1, ADC_INT_NUMBER2, ADC_INT_NUMBER3 or ADC_INT_NUMBER4 to get the result ready status for the conversions associated with the given interrupt number.
|
inlinestatic |
Powers up the analog-to-digital converter core.
base | is the base address of the ADC module. |
This function powers up the analog circuitry inside the analog core.
|
inlinestatic |
Powers down the analog-to-digital converter module.
base | is the base address of the ADC module. |
This function powers down the analog circuitry inside the analog core.
|
inlinestatic |
Forces a SOC flag to a 1 in the analog-to-digital converter.
base | is the base address of the ADC module. |
socNumber | is the number of the start-of-conversion. |
This function forces the SOC flag associated with the SOC specified by socNumber. This initiates a conversion once that SOC is given priority. This software trigger can be used whether or not the SOC has been configured to accept some other specific trigger.
|
inlinestatic |
Forces multiple SOC flags to 1 in the analog-to-digital converter.
base | is the base address of the ADC module. |
socMask | is the SOCs to be forced through software |
This function forces the SOCFRC1 flags associated with the SOCs specified by socMask. This initiates a conversion once the desired SOCs are given priority. This software trigger can be used whether or not the SOC has been configured to accept some other specific trigger. Valid values for socMask parameter can be any of the individual ADC_FORCE_SOCx values or any of their OR'd combination to trigger multiple SOCs.
|
inlinestatic |
Gets the current ADC interrupt status.
base | is the base address of the ADC module. |
adcIntNum | is interrupt number within the ADC wrapper. |
This function returns the interrupt status for the analog-to-digital converter.
adcIntNum takes a one of the values ADC_INT_NUMBER1, ADC_INT_NUMBER2, ADC_INT_NUMBER3, or ADC_INT_NUMBER4 to express which of the four interrupts of the ADC module should be cleared.
|
inlinestatic |
Clears ADC interrupt sources.
base | is the base address of the ADC module. |
adcIntNum | is interrupt number within the ADC wrapper. |
This function clears the specified ADC interrupt sources so that they no longer assert. If not in continuous mode, this function must be called before any further interrupt pulses may occur.
adcIntNum takes a one of the values ADC_INT_NUMBER1, ADC_INT_NUMBER2, ADC_INT_NUMBER3, or ADC_INT_NUMBER4 to express which of the four interrupts of the ADC module should be cleared.
|
inlinestatic |
Gets the current ADC interrupt overflow status.
base | is the base address of the ADC module. |
adcIntNum | is interrupt number within the ADC wrapper. |
This function returns the interrupt overflow status for the analog-to-digital converter. An overflow condition is generated irrespective of the continuous mode.
adcIntNum takes a one of the values ADC_INT_NUMBER1, ADC_INT_NUMBER2, ADC_INT_NUMBER3, or ADC_INT_NUMBER4 to express which of the four interrupts of the ADC module should be cleared.
|
inlinestatic |
Clears ADC interrupt overflow sources.
base | is the base address of the ADC module. |
adcIntNum | is interrupt number within the ADC wrapper. |
This function clears the specified ADC interrupt overflow sources so that they no longer assert. If software tries to clear the overflow in the same cycle that hardware tries to set the overflow, then hardware has priority.
adcIntNum takes a one of the values ADC_INT_NUMBER1, ADC_INT_NUMBER2, ADC_INT_NUMBER3, or ADC_INT_NUMBER4 to express which of the four interrupts of the ADC module should be cleared.
|
inlinestatic |
Reads the conversion result.
resultBase | is the base address of the ADC results. |
socNumber | is the number of the start-of-conversion. |
This function returns the conversion result that corresponds to the base address passed into resultBase and the SOC passed into socNumber.
The socNumber number is a value ADC_SOC_NUMBERX where X is a number from 0 to 15 specifying which SOC's result is to be read.
|
inlinestatic |
Determines whether the ADC is busy or not.
base | is the base address of the ADC. |
This function allows the caller to determine whether or not the ADC is busy and can sample another channel.
|
inlinestatic |
Set SOC burst mode.
base | is the base address of the ADC. |
trigger | the source that will cause the burst conversion sequence. |
burstSize | is the number of SOCs converted during a burst sequence. |
This function configures the burst trigger and burstSize of an ADC module. Burst mode allows a single trigger to walk through the round-robin SOCs one or more at a time. When burst mode is enabled, the trigger selected by the ADC_setupSOC() API will no longer have an effect on the SOCs in round-robin mode. Instead, the source specified through the trigger parameter will cause a burst of burstSize conversions to occur.
The trigger parameter takes the same values as the ADC_setupSOC() API The burstSize parameter should be a value between 1 and 16 inclusive.
|
inlinestatic |
Enables SOC burst mode.
base | is the base address of the ADC. |
This function enables SOC burst mode operation of the ADC. Burst mode allows a single trigger to walk through the round-robin SOCs one or more at a time. When burst mode is enabled, the trigger selected by the ADC_setupSOC() API will no longer have an effect on the SOCs in round-robin mode. Use ADC_setBurstMode() to configure the burst trigger and size.
|
inlinestatic |
Disables SOC burst mode.
base | is the base address of the ADC. |
This function disables SOC burst mode operation of the ADC. SOCs in round-robin mode will be triggered by the trigger configured using the ADC_setupSOC() API.
|
inlinestatic |
Sets the priority mode of the SOCs.
base | is the base address of the ADC. |
priMode | is the priority mode of the SOCs. |
This function sets the priority mode of the SOCs. There are three main modes that can be passed in the priMode parameter
|
inlinestatic |
Configures Open/Shorts Detection Circuit Mode.
base | is the base address of the ADC. |
modeVal | is the desired open/shorts detection circuit mode. |
This function configures the open/shorts detection circuit mode of the ADC.
|
inlinestatic |
Configures a post-processing block (PPB) in the ADC.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
socNumber | is the number of the start-of-conversion. |
This function associates a post-processing block with a SOC.
The ppbNumber is a value ADC_PPB_NUMBERX where X is a value from 1 to 4 inclusive that identifies a PPB to be configured. The socNumber number is a value ADC_SOC_NUMBERX where X is a number from 0 to 15 specifying which SOC is to be configured on the ADC module specified by base.
|
inlinestatic |
Enables individual ADC PPB event sources.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
evtFlags | is a bit mask of the event sources to be enabled. |
This function enables the indicated ADC PPB event sources. This will allow the specified events to propagate through the X-BAR to a pin or to an ePWM module.
|
inlinestatic |
Disables individual ADC PPB event sources.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
evtFlags | is a bit mask of the event sources to be enabled. |
This function disables the indicated ADC PPB event sources. This will stop the specified events from propagating through the X-BAR to other modules.
|
inlinestatic |
Enables individual ADC PPB event interrupt sources.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
intFlags | is a bit mask of the interrupt sources to be enabled. |
This function enables the indicated ADC PPB interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt. Disabled sources have no effect on the processor.
|
inlinestatic |
Disables individual ADC PPB event interrupt sources.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
intFlags | is a bit mask of the interrupt source to be disabled. |
This function disables the indicated ADC PPB interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt. Disabled sources have no effect on the processor.
|
inlinestatic |
Gets the current ADC event status.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function returns the event status for the analog-to-digital converter.
|
inlinestatic |
Clears ADC event flags.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
evtFlags | is a bit mask of the event source to be cleared. |
This function clears the indicated ADC PPB event flags. After an event occurs this function must be called to allow additional events to be produced.
|
inlinestatic |
Enables cycle-by-cycle clear of ADC PPB event flags.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function enables the automatic cycle-by-cycle clear of ADC PPB event flags. When enabled, the desired PPB event flags are automatically cleared on the next ADCPPBxRESULT load, unless a set condition is also occurring at the same time, in which case the set takes precedence.
|
inlinestatic |
Disables cycle-by-cycle clear of ADC PPB event flags.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function disables the cycle-by-cycle clear of ADC PPB event flags. When disabled, the desired PPB event flags are to be cleared explicitly in software inorder to generate next set of interrupts/events.
|
inlinestatic |
Configures PPB count limit.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
limit | is the desired PPB count limit. |
This function configures the PPB oversampling count limit which defines the number of ADC conversions to accumulate before partial sum is automatically loaded to the sum registes.
|
inlinestatic |
Returns the PPB count limit.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function returns the PPB oversampling count limit which defines the number of ADC conversions to accumulate before partial sum is automatically loaded to the sum registes.
|
inlinestatic |
Reads the oversampled partial count from the PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function returns the oversampled partial count that corresponds to the base address passed into base and the PPB passed into ppbNumber.
|
inlinestatic |
Reads the oversampled partial sum from the PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function returns the oversampled partial sum of PPB results that corresponds to the base address passed into base and the PPB passed into ppbNumber.
|
inlinestatic |
Reads the processed conversion result's partial maximum value from the PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function returns the oversampled partial maximum that corresponds to the base address passed into base and the PPB passed into ppbNumber.
|
inlinestatic |
Reads the processed conversion result's partial minimum value from the PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function returns the oversampled partial minimum that corresponds to the base address passed into base and the PPB passed into ppbNumber.
|
inlinestatic |
Reads the index of the result with partial maximum value from the PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function returns the index of the oversampled partial maximum value that corresponds to the base address passed into base and the PPB passed into ppbNumber.
|
inlinestatic |
Reads the index of the result with partial minimum value from the PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function returns the index of the oversampled partial minimum value that corresponds to the base address passed into base and the PPB passed into ppbNumber.
|
inlinestatic |
Enables absolute value capability in the PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function enables the absolute value functionality in the post- processing block specified by the ppbNumber parameter. When enabled, absolute value calculation would be done on the ADC Result associated with the selected SOC. In other words, the PPB result will calculated as shown below: (ADCPPBxRESULT = abs(ADCRESULTx - ADCPPBxOFFREF))
|
inlinestatic |
Disables absolute value capability in the PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function disables the absolute value functionality in the post- processing block specified by the ppbNumber parameter. When disabled, absolute value calculation would be done on the ADC Result associated with the selected SOC. In other words, the PPB result will calculated as shown below: (ADCPPBxRESULT = ADCRESULTx - ADCPPBxOFFREF)
|
inlinestatic |
Configures PPB shift value.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
shiftVal | is the number of bits to right shift PSUM before loading to final PPB SUM. |
This function configured the shift value required to right shift the PPB PSUM before loading into the final PPB SUM.
|
inlinestatic |
Configures PPB sync input.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
syncInput | is the desired sync event to transfer partial registers to final registers and reset the partial registers. |
This function configures desired sync event to transfer partial registers to final registers and reset the partial registers. For valid values of syncInput refer to enum ADC_SyncInput.
|
inlinestatic |
Forces PPB software sync.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function forces the software sync for the desired PPB.
|
inlinestatic |
Configures PPB interrupt source.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
osIntSrc | selects PPB interrupt source. |
This function sets which oversampling event is the source of a PPB intterupt.
For valid values of osIntSrc refer to enum ADC_PPBIntSrcSelect.
|
inlinestatic |
Configures PPB compare source.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
compSrc | is the desired source to be used for zero crossing detect logic and threshold compare. |
This function configures the desired source to be used for zero crossing detect logic and threshold compare. For valid values of compSrc refer to enum ADC_PPBCompSource.
|
inlinestatic |
Reads the oversampled final sum from the PPB.
resultBase | is the base address of the ADC results. |
ppbNumber | is the number of the post-processing block. |
This function returns the processed sum of results that corresponds to the base address passed into resultBase and the PPB passed into ppbNumber.
|
inlinestatic |
Reads the oversampled final count from the PPB.
resultBase | is the base address of the ADC results. |
ppbNumber | is the number of the post-processing block. |
This function returns the oversampled final count that corresponds to the base address passed into resultBase and the PPB passed into ppbNumber.
|
inlinestatic |
Reads the processed conversion result's maximum value from the PPB.
resultBase | is the base address of the ADC results. |
ppbNumber | is the number of the post-processing block. |
This function returns the oversampled final maximum that corresponds to the base address passed into resultBase and the PPB passed into ppbNumber.
|
inlinestatic |
Reads the processed conversion result's minimum value from the PPB.
resultBase | is the base address of the ADC results. |
ppbNumber | is the number of the post-processing block. |
This function returns the processed conversion result that corresponds to the base address passed into resultBase and the PPB passed into ppbNumber.
|
inlinestatic |
Reads the index of the result with maximum value from the PPB.
resultBase | is the base address of the ADC results. |
ppbNumber | is the number of the post-processing block. |
This function returns the index of the processed conversion's maximum value that corresponds to the base address passed into resultBase and the PPB passed into ppbNumber.
|
inlinestatic |
Reads the index of the result with minimum value from the PPB.
resultBase | is the base address of the ADC results. |
ppbNumber | is the number of the post-processing block. |
This function returns the index of the processed conversion's minimum value that corresponds to the base address passed into resultBase and the PPB passed into ppbNumber.
|
inlinestatic |
Reads the processed conversion result from the PPB.
resultBase | is the base address of the ADC results. |
ppbNumber | is the number of the post-processing block. |
This function returns the processed conversion result that corresponds to the base address passed into resultBase and the PPB passed into ppbNumber.
|
inlinestatic |
Reads sample delay time stamp from a PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function returns the sample delay time stamp. This delay is the number of system clock cycles between the SOC being triggered and when it began converting.
|
inlinestatic |
Sets the post processing block offset correction.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
offset | is the 10-bit signed value subtracted from ADC the output. |
This function sets the PPB offset correction value. This value can be used to digitally remove any system-level offset inherent in the ADCIN circuit before it is stored in the appropriate result register. The offset parameter is subtracted from the ADC output and is a signed value from -512 to 511 inclusive. For example, when offset = 1, ADCRESULT = ADC output - 1. When offset = -512, ADCRESULT = ADC output - (-512) or ADC output + 512.
Passing a zero in to the offset parameter will effectively disable the calculation, allowing the raw ADC result to be passed unchanged into the result register.
|
inlinestatic |
Sets the post processing block reference offset.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
offset | is the 12-bit unsigned value subtracted from ADC the output. |
This function sets the PPB reference offset value. This can be used to either calculate the feedback error or convert a unipolar signal to bipolar by subtracting a reference value. The result will be stored in the appropriate PPB result register which can be read using ADC_readPPBResult().
Passing a zero in to the offset parameter will effectively disable the calculation and will pass the ADC result to the PPB result register unchanged.
|
inlinestatic |
Enables two's complement capability in the PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function enables two's complement in the post-processing block specified by the ppbNumber parameter. When enabled, a two's complement will be performed on the output of the offset subtraction before it is stored in the appropriate PPB result register. In other words, the PPB result will be the reference offset value minus the the ADC result value (ADCPPBxRESULT = ADCSOCxOFFREF - ADCRESULTx).
|
inlinestatic |
Disables two's complement capability in the PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function disables two's complement in the post-processing block specified by the ppbNumber parameter. When disabled, a two's complement will NOT be performed on the output of the offset subtraction before it is stored in the appropriate PPB result register. In other words, the PPB result will be the ADC result value minus the reference offset value (ADCPPBxRESULT = ADCRESULTx - ADCSOCxOFFREF).
|
inlinestatic |
Enables the extended low limit in the PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function enables the low limit for PPB by allowing the PPB low limit to be set by ADCPPBxTRIPLO2 register.
|
inlinestatic |
Disables extended low limit capability in the PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
This function disables the low limit for PPB by allowing the PPB low limit to be set by ADCPPBxTRIPLO register.
|
inlinestatic |
Enables an ADC interrupt source.
base | is the base address of the ADC module. |
adcIntNum | is interrupt number within the ADC wrapper. |
This function enables the indicated ADC interrupt source. Only the sources that are enabled can be reflected to the processor interrupt. Disabled sources have no effect on the processor.
adcIntNum can take the value ADC_INT_NUMBER1, ADC_INT_NUMBER2, ADC_INT_NUMBER3, or ADC_INT_NUMBER4 to express which of the four interrupts of the ADC module should be enabled.
|
inlinestatic |
Disables an ADC interrupt source.
base | is the base address of the ADC module. |
adcIntNum | is interrupt number within the ADC wrapper. |
This function disables the indicated ADC interrupt source. Only the sources that are enabled can be reflected to the processor interrupt. Disabled sources have no effect on the processor.
adcIntNum can take the value ADC_INT_NUMBER1, ADC_INT_NUMBER2, ADC_INT_NUMBER3, or ADC_INT_NUMBER4 to express which of the four interrupts of the ADC module should be disabled.
|
inlinestatic |
Sets the source EOC for an analog-to-digital converter interrupt.
base | is the base address of the ADC module. |
adcIntNum | is interrupt number within the ADC wrapper. |
intTrigger | is the interrupt source EOCx, OSINTy are used. |
This function sets which conversion is the source of an ADC interrupt.
The intTrigger number is a value ADC_INT_TRIGGER_X where X specifies the interrupt trigger to be configured for the ADC module specified by base. Refer ADC_IntTrigger enum for valid values for this input.
adcIntNum can take the value ADC_INT_NUMBER1, ADC_INT_NUMBER2, ADC_INT_NUMBER3, or ADC_INT_NUMBER4 to express which of the four interrupts of the ADC module is being configured.
|
inlinestatic |
Enables continuous mode for an ADC interrupt.
base | is the base address of the ADC. |
adcIntNum | is interrupt number within the ADC wrapper. |
This function enables continuous mode for the ADC interrupt passed into adcIntNum. This means that pulses will be generated for the specified ADC interrupt whenever an EOC pulse is generated irrespective of whether or not the flag bit is set.
adcIntNum can take the value ADC_INT_NUMBER1, ADC_INT_NUMBER2, ADC_INT_NUMBER3, or ADC_INT_NUMBER4 to express which of the four interrupts of the ADC module is being configured.
|
inlinestatic |
Disables continuous mode for an ADC interrupt.
base | is the base address of the ADC. |
adcIntNum | is interrupt number within the ADC wrapper. |
This function disables continuous mode for the ADC interrupt passed into adcIntNum. This means that pulses will not be generated for the specified ADC interrupt until the corresponding interrupt flag for the previous interrupt occurrence has been cleared using ADC_clearInterruptStatus().
adcIntNum can take the value ADC_INT_NUMBER1, ADC_INT_NUMBER2, ADC_INT_NUMBER3, or ADC_INT_NUMBER4 to express which of the four interrupts of the ADC module is being configured.
|
inlinestatic |
Configures the safety checker result for a selected SOC.
base | is the base address of the ADC module. |
socNumber | is the number of the start-of-conversion. |
scInput | is the desired input configuration. |
This function configures the safety checker input for the desired SOC.
The socNumber number is a value ADC_SOC_NUMBERX where X is a number from 0 to 15 specifying which SOC is to be configured on the ADC module specified by base.
The scInput is the desired safety checker input configuration. Valid values can be refered from the enum ADC_SafetyCheckerInput.
|
inlinestatic |
Enables the ADC result safety checker module.
scBase | is the base address of the ADC Safety Checker module. |
This function enables the ADC result safety checker module.
|
inlinestatic |
Disables the ADC result safety checker module.
scBase | is the base address of the ADC Safety Checker module. |
This function disables the ADC result safety checker module.
|
inlinestatic |
Forces the software sync for the safety checker module
scBase | is the base address of the safety checker module. |
This function forces the software sync for the safety checker module.
|
inlinestatic |
Returns the status of the safey checker module.
scBase | is the base address of the ADC safety checker module. |
This function configures the external channel for an SOC by configuring the external channel mux for an SOC.
|
inlinestatic |
Configures the safety checker module.
scBase | is the base address of the ADC safety checker module. |
checkInst | is the safety checker instance to be configured. |
adcInst | is the desired ADC instance. |
adcResultInst | is the desired ADC result instance. |
This function configures the selected checker instance of a safety checker instance.
The checkInst parameter can take values defined by enum ADC_SafetyCheckInst. The adcInst parameter can take values defined by enum ADC_Select. The adcResultInst parameter can take values defined by enum ADC_ResultSelect.
|
inlinestatic |
Configures the tolerance allowed between safety check results.
scBase | is the base address of the ADC safety checker module. |
tolerance | is the number of the start-of-conversion. |
This function configures the tolerance for the difference between check result instances of the selected safety checker instance.
|
inlinestatic |
Returns the safety check result for the selected instance.
scBase | is the base address of the ADC safety checker module. |
checkInst | is the number of the start-of-conversion. |
This function returns the safety check result for the selected instance.
The checkInst number is a value ADC_SAFETY_CHECKx where x is a number from 1 to 2 specifying the safety result check instances available in the safety checker instance specified by scBase.
|
inlinestatic |
Enables the safety checker event sources for selected instance.
scIntEvtBase | is the base address of ADC Safe Check INTEVT module. |
checkResult | is the desired ADC Safety Checker result. |
checkEvent | is the desired event number. |
checkerNumber | is the number of the checker tile. |
This function enables the indicated safety checker event sources.
The checkResult specifies the result of the OOT or OVF events. It should be one of the following values.
The checkEvent is a value ADC_SAFETY_CHECK_EVENTx where x is a number from 1 to 4 specifying the safety check events available in the safety checker specified by scIntEvtBase.
The checkerNumber number is a value ADC_SAFETY_CHECKERx where x is a number from 1 to 8 specifying which Checker Tile is to be selected in the ADC module.
|
inlinestatic |
Disables the safety checker event sources for selected instance.
scIntEvtBase | is the base address of ADC Safe Check INTEVT module. |
checkResult | is the desired ADC Safety Checker result. |
checkEvent | is the desired event number. |
checkerNumber | is the number of the checker tile. |
This function disables the indicated safety checker event sources.
The checkResult specifies the result of the OOT or OVF events. It should be one of the following values.
The checkEvent is a value ADC_SAFETY_CHECK_EVENTx where x is a number from 1 to 4 specifying the safety check events available in the safety checker specified by scIntEvtBase.
The checkerNumber number is a value ADC_CHECKER_NUMBERx where x is a number from 1 to 8 specifying which Checker Tile is to be selected in the ADC module.
|
inlinestatic |
Enables the safety checker interrupt sources for selected instance.
scIntEvtBase | is the base address of ADC Safe Check INTEVT module. |
checkResult | is the desired ADC Safety Checker interrupt result. |
checkerNumber | is the number of the checker tile. |
This function enables the indicated safety checker interrupt sources.
The checkResult specifies the result of the OOT or OVF events. It should be one of the following values.
The checkerNumber number is a value ADC_CHECKER_NUMBERx where x is a number from 1 to 8 specifying which Checker Tile is to be selected in the ADC module.
|
inlinestatic |
Disables the safety checker interrupt sources for selected instance.
scIntEvtBase | is the base address of ADC Safe Check INTEVT module. |
checkResult | is the desired ADC Safety Checker interrupt result. |
checkerNumber | is the number of the checker tile. |
This function disables the indicated safety checker interrupt sources.
The checkResult specifies the result of the OOT or OVF events. It should be one of the following values.
The checkerNumber number is a value ADC_CHECKER_NUMBERx where x is a number from 1 to 8 specifying which Checker Tile is to be selected in the ADC module.
|
inlinestatic |
Get the ADC safety checker OOT and OVF event status.
scIntEvtBase | is the base address of ADC Safe Check INTEVT module. |
checkerFlag | is the desired ADC Safety Checker event status. |
checkerNumber | is the number of the checker tile. |
This function returns the event status for the OOT or OVF event.
The checkerFlag specifies the ADC safety checker event status of OOT or OVF events. It should be one of the following values.
The checkerNumber number is a value ADC_SAFETY_CHECKERx where x is a number from 1 to 8 specifying which Checker Tile is to be selected in the ADC module specified by scIntEvtBase.
|
inlinestatic |
Clears the ADC safety checker OOT and OVF event status.
scIntEvtBase | is the base address of ADC Safe Check INTEVT module. |
checkerFlag | is the desired ADC Safety Checker event status. |
checkerNumber | is the number of the checker tile. |
This funtion clears the specified ADC Safety Checker event status so that they no longer assert.
checkerFlag takes one of the values ADC_SAFETY_CHECK_OOT_FLG, ADC_SAFETY_CHECK_RES1OVF_FLG or ADC_SAFETY_CHECK_RES2OVF_FLG to express which of the three event status of the ADC Safety Checker should be cleared.
The checkerNumber number is a value ADC_SAFETY_CHECKERx where x is a number from 1 to 8 specifying which Checker Tile is to be selected in the ADC module specified by scIntEvtBase.
|
inlinestatic |
Get the ADC safety checker interrupt status.
scIntEvtBase | is the base address of ADC Safe Check INTEVT module. |
This function returns the interrupt status for the OOT or OVF event.
|
inlinestatic |
Clears the ADC safety checker interrupt status.
scIntEvtBase | is the base address of ADC Safe Check INTEVT module. |
This funtion clears the specified ADC Safety Checker interrupt status so that they no longer assert.
|
inlinestatic |
Configures the trigger repeater mode select.
base | is the base address of the ADC module. |
repInstance | is the repeater instance. |
mode | is the repeater mode. |
This function configures desired ADC trigger repeater mode that corresponds to mode to select either oversampling or undersampling mode.
The repInstance is the repeater instance to be configured. Valid values for this parameter can be referred from the enum ADC_RepInstance.
|
inlinestatic |
Get the trigger repeater active mode status.
base | is the base address of the ADC module. |
repInstance | is the repeater instance. |
This function returns the status of the ADC trigger repeater mode for the selected repeater instance.
The repInstance is the repeater instance to be configured. Valid values for this parameter can be referred from the enum ADC_RepInstance.
|
inlinestatic |
Get the trigger repeater module busy indication.
base | is the base address of the ADC module. |
repInstance | is the repeater instance. |
This function returns the status of the ADC trigger repeater module for the selected repeater instance.
The repInstance is the repeater instance to be configured. Valid values for this parameter can be referred from the enum ADC_RepInstance.
|
inlinestatic |
Configures the trigger source of the trigger repeater.
base | is the base address of the ADC module. |
repInstance | is the repeater instance. |
trigger | the source to modify via oversampling or undersampling. |
This function configures ADC trigger repeater by selecting the trigger source passed into trigger to modify via oversampling or undersampling.
The repInstance is the repeater instance to be configured. Valid values for this parameter can be referred from the enum ADC_RepInstance.
|
inlinestatic |
Configures the trigger repeater syncin source.
base | is the base address of the ADC module. |
repInstance | is the repeater instance. |
syncInput | is the desired sync event to reset all counters. |
This function configures desired ADC trigger repeater sync event that corresponds to syncInput to reset all counters and any pending repeated triggers are discarded.
The repInstance is the repeater instance to be configured. Valid values for this parameter can be referred from the enum ADC_RepInstance.
|
inlinestatic |
Forces software sync for the trigger repeater block.
base | is the base address of the ADC module. |
repInstance | is the repeater instance. |
This function forces the software sync for the trigger repeater block.
The repInstance is the repeater instance to be configured. Valid values for this parameter can be referred from the enum ADC_RepInstance.
|
inlinestatic |
Configures the trigger repeater count.
base | is the base address of the ADC module. |
repInstance | is the repeater instance. |
repCount | is the desired trigger count to be selected. |
This function indicates the number of repeated triggers passed into repCount and remaining triggers to be generated/supressed. In oversampling mode, the repCount parameter is the number of desired repeated triggers to be generated. It should be a value between 0 to 127 where (repCount + 1) triggers will be generated. For example, when repCount = 2, 3 triggers will be generated on receiving corresponding REPxCTL.TRIGSEL. In unversampling mode, the repCount parameter is the number of desired triggers to be supressed. It should be a value between 0 to 127 where 1 out of (repCount + 1) triggers received will be passed through. For Example, when repCount = 2, 1 out of 3 triggers will be generated.
The repInstance is the repeater instance to be configured. Valid values for this parameter can be referred from the enum ADC_RepInstance.
|
inlinestatic |
Configures the trigger repeater phase.
base | is the base address of the ADC module. |
repInstance | is the repeater instance. |
repPhase | indicates the repeater trigger phase delay in sysclk cycles. |
This function configures the phase delay that corresponds to repPhase by defining the number of sysclk to delay the selected trigger. The repPhase parameter should be a value between 0 and 65535 inclusive. For example, passing a 2 to the offset parameter will delay the trigger by 2 sysclks and passing 0 will pass through the trigger without delay.
The repInstance is the repeater instance to be configured. Valid values for this parameter can be referred from the enum ADC_RepInstance.
|
inlinestatic |
Configures the trigger repeater spread.
base | is the base address of the ADC module. |
repInstance | is the repeater instance. |
repSpread | is the desired trigger spread in sysclk cycle. |
This function configures the spread time by setting repSpread to number of sysclk desired between triggers. In oversampling mode, the repSpread parameter is the minimum number of sysclks to wait before creating the next repeated trigger to the ADC. It should be a value between 0 and 65535 inclusive. For example, passing a 2 to the offset parameter will create at least 2 sysclk time between repeated triggers.
The repInstance is the repeater instance to be configured. Valid values for this parameter can be referred from the enum ADC_RepInstance.
void ADC_setMode | ( | uint32_t | base, |
ADC_Resolution | resolution, | ||
ADC_SignalMode | signalMode | ||
) |
Configures the analog-to-digital converter resolution and signal mode.
base | is the base address of the ADC module. |
resolution | is the resolution of the converter (12 bits). |
signalMode | is the input signal mode of the converter. |
This function configures the ADC module's conversion resolution and input signal mode and ensures that the corresponding trims are loaded.
The resolution parameter specifies the resolution of the conversion. It can be 12-bit specified by ADC_RESOLUTION_12BIT
The signalMode parameter specifies the signal mode. In single-ended mode, which is indicated by ADC_MODE_SINGLE_ENDED, the input voltage is sampled on a single pin referenced to VREFLO. In differential mode, which is indicated by ADC_MODE_DIFFERENTIAL, the input voltage to the converter is sampled on a pair of input pins, a positive and a negative.
void ADC_setPPBTripLimits | ( | uint32_t | base, |
ADC_PPBNumber | ppbNumber, | ||
int32_t | tripHiLimit, | ||
int32_t | tripLoLimit | ||
) |
Sets the windowed trip limits for a PPB.
base | is the base address of the ADC module. |
ppbNumber | is the number of the post-processing block. |
tripHiLimit | is the value is the digital comparator trip high limit. |
tripLoLimit | is the value is the digital comparator trip low limit. |
This function sets the windowed trip limits for a PPB. These values set the digital comparator so that when one of the values is exceeded, either a high or low trip event will occur.
The ppbNumber is a value ADC_PPB_NUMBERX where X is a value from 1 to 4 inclusive that identifies a PPB to be configured.
In 12-bit mode, only bits 12:0 will be compared against bits 12:0 of the PPB result.