文章目录
-
- ADC
-
- Post Build Variant Used
- Config Variant
- AdcConfigSet
-
- AdcHwUnit_0
-
- Adc Hardware Unit
- Adc Logical Unit ID
- Adc Transfer Type
- Select Dma Channel
- Select Adc Streaming Dma Channel
- Adc Source Clock
- Adc Prescaler Value
- Adc Alternate Prescale
- Adc Calibration Prescale
- Adc Enable High Speed
- Adc Alternate High Speed Option
- Adc Power Down Delay (0 -> 255)
- Adc Alternate Power Down Delay (0 -> 255)
- Adc Mux Delay (0 -> 65535)
- Adc Auto Clock Off
- Adc Bypass Sampling
- Adc Result Overwrite Enable
- Adc Presampling channel (0 - 31)
- Adc Presampling channel (32 - 63)
- User Offset (0 -> 255)
- User Gain (0 -> 65535)
- Conversion resolution
- Bypass resolution processing
- DMA Clear Source
- Adc Voltage Reference (0x0 -> 0x58)
- AdcNormalConvTimings
- AdcChannel
- AdcThresholdControl
- AdcGroup
- AdcHwTrigger
- BctuHwUnit
- AdcGeneral
- AutosarExt
-
- Adc Timeout Method
- Adc Timeout Value (0 -> 4294967295)
- AdcSar IP Dev Error Detect
- Bctu IP Dev Error Detect
- Adc Multicore Support
- Adc Channel Indexes Symbolic Names
- Adc Bypass Abort Chain Check
- Adc Conversion Time Once
- Adc Optimize OneShot HwTrigger Conversions
- Adc Optimize DMA Streaming Groups
- Adc Presampling Time Once
- Adc Initial Notification Capability
- Adc Enable DMA support
- Adc Use Software Injected Groups
- Adc Use Hardware Normal Groups
- Enable Adc User Mode Support
- Adc Set HW Unit Power Mode API
- Adc Enable/Disable Channels API
- Adc Get Injected Conversions Status API
- Adc Enable Configure Threshold API
- Adc CTU Hardware Trigger API
- CTU Enable Hardware Trigger Optimization
- Adc CTU Control Mode API
- Adc BCTU Control Mode Enable DMA support
- Adc Enable Watchdog Api
- Adc Set Channel API
- Adc Set Clock Mode API
- Adc Enable Calibration API
- Adc Enable Self Test API
- Adc Enable Raw Data Read Api
- Adc Enable Group Streaming Results Reorder
- Adc Enable Tempsense Api
- Adc PowerOn Tempsense
- Adc TempSense Voltage Supply (0x0 -> 0x58)
配置ADC之前需要确保其他相关的模块已正确配置,包括 Port,Mcl,Gpt,Platform
此处我们使用了硬件触发,通过Gpt模块配置定时器,Mcl模块配置DMA,TrgMux,
ADC
Post Build Variant Used
指示模块实现是否有或计划有(即,在链接时或post-build引入)新的post-build变化点。
Config Variant
配置类。启用可为特定配置类编辑的参数
AdcConfigSet
AdcHwUnit_0
Adc Hardware Unit
配置硬件单元,该芯片有三个ADC单元
Adc Logical Unit ID
一般与ADC硬件单元号保持一致
Adc Transfer Type
选择中断或Dma传输类型。如果AdcTransferType需要DMA,建议将AdcWithoutInterrupts设置为false,否则,DMA将不被配置,用户将负责通过调用Adc_ReadGroup直接从寄存器读取结果。
Select Dma Channel
配置对应的DMA通道&#x