使用EB配置ADC驱动

发布时间 2023-06-08 17:41:34作者: lance9527
  1. 概述:ADC驱动程序负责提供指定的AUTOSAR标准模数转换服务,使用逐次逼近寄存器(SAR)原理将模拟输入值(电压)转换为离散数字值;

 

  1. 依赖硬件

 

  1. 详细配置

container:AdcGeneral 中包含ADC驱动程序的所有常规配置参数;

AdcDeInitApi

AdcDevErrorDectect

AdcSafetyEnable

AdcMultiCoreErrorDectect

AdcInitCheckApi

AdcEnableLimitCheck

AdcEnableQueuing

AdcEnableStartStopGroupApi

AdcGrpNotifCapability

AdcHwTriggerApi

AdcReadGroupApi

AdcVersionInfoApi

AdcStartspCalibApi

AdcTriggerOneConversionEnable

AdcSyncConvEnable

AdcLowPowerStatesSupport

AdcPowerStateAsynchTransitionMode

AdcPriorityImplementation

AdcResultHandlingImplementation

AdcResultAlignment

AdcPowerStateConfig

AdcMaxChConvTimeCount

AdcSleepMode

AdcSupplyVoltage

AdcRuntimeApiMode

AdcInitDeInitApiMode

 

container:AdcDemEventParameterRefs

AdcClcFailureNotifiation

AdcConvStopTimeNotification

 

container:AdcConfigSet

AdcSyncClockDisable

AdcSystemClock

AdcGlobalInputClass

AdcChSampleTime

AdcChPreChargeClkCycles

AdcChConvMode

AdcChSESPSEnable

 

container:AdcHwUnit

AdcClockSource

AdcHwUnitId

AdcIdlePrechargeEnable

AdcInputBufferEnable

AdcPrechargeReference

AdcReferencePrechargePhases

AdcCalibrationSampleTime

AdcPostCalibrationDisable

AdcAnalogClockSyncDelay

AdcSampleSyncEnable

AdcMSBDoubleClkEnable

AdcRequestSource0ConvMode

AdcRequestSource1ConvMode

AdcRequestSource2ConvMode

AdcSyncConvMode

AdcPrescale

AdcHwUnitInputClass

 

container:AdcChannel

AdcChannel

AdcChannelConv

AdcChannelHighLimit

AdcChannelId

AdcChannelLimitCheck

AdcChannelLowLimit

AdcChannelRangeSelect

AdcChannelRefVoltsrcHigh

AdcChannelRefVoltsrcLow

AdcChannelResolution

AdcChannelSampTIme

AdcAnChannelNum

AdcInputClassSelection

AdcSyncConvChannelEnable

AdcBWDEnable

AdcBWDPrechargeLevel

 

container:AdcGroup

AdcGroupAccessMode

AdcGroupConversionMode

AdcGroupId

AdcGroupPriority

AdcGroupReplacement

AdcGroupTriggerSrc

AdcHwTrigSignal

AdcHwTrigTimer

AdcNotification

AdcStreamingBufferMode

AdcStreamingNumSamples

AdcHwExtTrigSelect

AdcHwExtGateSelect

AdcHwExtGateSignal

AdcChannel0Alias

AdcChannel1Alias

AdcResRegDefinition

EruTriggerConfig

EruGatingConfig

EruTriggerTImerConfig

EruGatingTImerConfig

 

container:AdcPublshedInfomation 

AdcChannelValueSigned

AdcGroupFirstChannelFixed

AdcMaxChannelResolution

container:CommonPublishedInformatica 中是软件自动生成的版本号默认值,用户无需修改,保持默认即可。

 

 

 

container:GtmTomChannelConf

 

container:GtmTriggerForAdc

 

container:McuGtmTomChannelAllocationConf

注释1:8路ADC主组 和 4路ADC次组,OUT0的SEL7对TRIG0[7];OUT1的SEL0对TRIG0[8];

注释2:EVADC,DSADC;ADCTRIG1-3支持EVADC,DSADC;ADCTRIG4仅支持EVADC;

注释3:GtmTriggerForAdc中的ADC外设号会决定ADC_TRIGx[7:0]还是ADC_TRIGx[11:8],即能决定ADCTRIG0OUTx.SELy中的x和y;其内GtmAdcTriggerXSelect决定ADC_TRIGX中的x;GtmAdcTriggerxSelect的16个下拉值会决定指定SELx的取值,即16条输入线的那条能过去;因此ADC9的GtmAdcTrigger3Select的下拉值会体现在寄存器ADCTRIG3OUT1.SEL1上;

 

GtmTriggerForAdc_8 :GtmAdcTrigger0Select