TI中文支持网
TI专业的中文技术问题咨询交流网站

CC2650 4*4 封装的adc的adcCC26xxHWAttrs能提供一下么

从lauch.c文件中得到的7*7的adc表格如下:

/* Place into subsections to allow the TI linker to remove items properly */
#if defined(__TI_COMPILER_VERSION__)
#pragma DATA_SECTION(ADC_config, ".const:ADC_config")
#pragma DATA_SECTION(adcCC26xxHWAttrs, ".const:adcCC26xxHWAttrs")
#endif

/* Include drivers */
#include <ti/drivers/ADC.h>
#include <ti/drivers/adc/ADCCC26XX.h>


#define Board_DIO23_ANALOGIOID_23
#define Board_DIO24_ANALOGIOID_24
#define Board_DIO25_ANALOGIOID_25
#define Board_DIO26_ANALOGIOID_26
#define Board_DIO27_ANALOGIOID_27
#define Board_DIO28_ANALOGIOID_28
#define Board_DIO29_ANALOGIOID_29
#define Board_DIO30_ANALOGIOID_30


typedef enum CC2650_LAUNCHXL_ADCName {CC2650_LAUNCHXL_ADC0 = 0,CC2650_LAUNCHXL_ADC1,CC2650_LAUNCHXL_ADC2,CC2650_LAUNCHXL_ADC3,CC2650_LAUNCHXL_ADC4,CC2650_LAUNCHXL_ADC5,CC2650_LAUNCHXL_ADC6,CC2650_LAUNCHXL_ADC7,CC2650_LAUNCHXL_ADCDCOUPL,CC2650_LAUNCHXL_ADCVSS,CC2650_LAUNCHXL_ADCVDDS,CC2650_LAUNCHXL_ADCCOUNT
} CC2650_LAUNCHXL_ADCName;

/* ADC objects */
static ADCCC26XX_Object adcCC26xxObjects[CC2650_LAUNCHXL_ADCCOUNT];


static const ADCCC26XX_HWAttrs adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADCCOUNT] = {{.adcDIO = Board_DIO23_ANALOG,.adcCompBInput = ADC_COMPB_IN_AUXIO7,.refSource = ADCCC26XX_FIXED_REFERENCE,.samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,.inputScalingEnabled = true,.triggerSource = ADCCC26XX_TRIGGER_MANUAL},{.adcDIO = Board_DIO24_ANALOG,.adcCompBInput = ADC_COMPB_IN_AUXIO6,.refSource = ADCCC26XX_FIXED_REFERENCE,.samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,.inputScalingEnabled = true,.triggerSource = ADCCC26XX_TRIGGER_MANUAL},{.adcDIO = Board_DIO25_ANALOG,.adcCompBInput = ADC_COMPB_IN_AUXIO5,.refSource = ADCCC26XX_FIXED_REFERENCE,.samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,.inputScalingEnabled = true,.triggerSource = ADCCC26XX_TRIGGER_MANUAL},{.adcDIO = Board_DIO26_ANALOG,.adcCompBInput = ADC_COMPB_IN_AUXIO4,.refSource = ADCCC26XX_FIXED_REFERENCE,.samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,.inputScalingEnabled = true,.triggerSource = ADCCC26XX_TRIGGER_MANUAL},{.adcDIO = Board_DIO27_ANALOG,.adcCompBInput = ADC_COMPB_IN_AUXIO3,.refSource = ADCCC26XX_FIXED_REFERENCE,.samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,.inputScalingEnabled = true,.triggerSource = ADCCC26XX_TRIGGER_MANUAL},{.adcDIO = Board_DIO28_ANALOG,.adcCompBInput = ADC_COMPB_IN_AUXIO2,.refSource = ADCCC26XX_FIXED_REFERENCE,.samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,.inputScalingEnabled = true,.triggerSource = ADCCC26XX_TRIGGER_MANUAL},{.adcDIO = Board_DIO29_ANALOG,.adcCompBInput = ADC_COMPB_IN_AUXIO1,.refSource = ADCCC26XX_FIXED_REFERENCE,.samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,.inputScalingEnabled = true,.triggerSource = ADCCC26XX_TRIGGER_MANUAL},{.adcDIO = Board_DIO30_ANALOG,.adcCompBInput = ADC_COMPB_IN_AUXIO0,.refSource = ADCCC26XX_FIXED_REFERENCE,.samplingDuration = ADCCC26XX_SAMPLING_DURATION_10P9_MS,.inputScalingEnabled = true,.triggerSource = ADCCC26XX_TRIGGER_MANUAL},{.adcDIO = PIN_UNASSIGNED,.adcCompBInput = ADC_COMPB_IN_DCOUPL,.refSource = ADCCC26XX_FIXED_REFERENCE,.samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,.inputScalingEnabled = true,.triggerSource = ADCCC26XX_TRIGGER_MANUAL},{.adcDIO = PIN_UNASSIGNED,.adcCompBInput = ADC_COMPB_IN_VSS,.refSource = ADCCC26XX_FIXED_REFERENCE,.samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,.inputScalingEnabled = true,.triggerSource = ADCCC26XX_TRIGGER_MANUAL},{.adcDIO = PIN_UNASSIGNED,.adcCompBInput = ADC_COMPB_IN_VDDS,.refSource = ADCCC26XX_FIXED_REFERENCE,.samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,.inputScalingEnabled = true,.triggerSource = ADCCC26XX_TRIGGER_MANUAL}
};

const ADC_Config ADC_config2[] = {{&ADCCC26XX_fxnTable, &adcCC26xxObjects[0], &adcCC26xxHWAttrs[0]},{&ADCCC26XX_fxnTable, &adcCC26xxObjects[1], &adcCC26xxHWAttrs[1]},{&ADCCC26XX_fxnTable, &adcCC26xxObjects[2], &adcCC26xxHWAttrs[2]},{&ADCCC26XX_fxnTable, &adcCC26xxObjects[3], &adcCC26xxHWAttrs[3]},{&ADCCC26XX_fxnTable, &adcCC26xxObjects[4], &adcCC26xxHWAttrs[4]},{&ADCCC26XX_fxnTable, &adcCC26xxObjects[5], &adcCC26xxHWAttrs[5]},{&ADCCC26XX_fxnTable, &adcCC26xxObjects[6], &adcCC26xxHWAttrs[6]},{&ADCCC26XX_fxnTable, &adcCC26xxObjects[7], &adcCC26xxHWAttrs[7]},{&ADCCC26XX_fxnTable, &adcCC26xxObjects[8], &adcCC26xxHWAttrs[8]},{&ADCCC26XX_fxnTable, &adcCC26xxObjects[9], &adcCC26xxHWAttrs[9]},{&ADCCC26XX_fxnTable, &adcCC26xxObjects[10], &adcCC26xxHWAttrs[10]},{NULL, NULL, NULL},
};

请问4*4封装的adcCC26xxHWAttrs表格从哪弄?

Viki Shi:

引脚可以自己配置的,你是要换封装吗?

user1388075:

回复 Viki Shi:

管脚和adc通道应该有个对应关系吧,

比如Board_DIO23_ANALOG对应的adcCompBInput = ADC_COMPB_IN_AUXIO7,为adc的第0个通道。

能帮忙弄个4*4的对应表格么?之前估计是4*4的对应关系不对,adc一直没调通

Viki Shi:

回复 user1388075:

我这边都是7*7封装,因此没有4*4的配置表。不同封装的可用GPIO数量不一样,需要用户自定义修改。建议按照下面链接的方式改封装:e2echina.ti.com/…/193575

user1388075:

回复 Viki Shi:

你这个链接的我会配,我说的是adc的通道对应关系,就像我上面程序里的一样,需要4*4的。

赞(0)
未经允许不得转载:TI中文支持网 » CC2650 4*4 封装的adc的adcCC26xxHWAttrs能提供一下么
分享到: 更多 (0)