各位老师,公司自己做的4*4 CC1310板子,要用ADC功能。我用LaunchPad跑adcsinglechannel例程,用DIO23可以测得输入电压,但怎么移植到公司的板子啊?公司板子用DIO9,如下设置不行啊
const ADCCC26XX_HWAttrs adcCC26xxHWAttrs[CC1310_LAUNCHXL_ADCCOUNT] = {
{
//.adcDIO = IDIO_9,
.adcCompBInput = ADC_COMPB_IN_AUXIO7, //ADC_COMPB_IN_AUXIO7,ADC_COMPB_IN_VDDS
.refSource =ADCCC26XX_FIXED_REFERENCE, //ADCCC26XX_VDDS_REFERENCE ADCCC26XX_FIXED_REFERENCE
.samplingDuration =ADCCC26XX_SAMPLING_DURATION_2P7_US,
.inputScalingEnabled = true, //true,false
.triggerSource =ADCCC26XX_TRIGGER_MANUAL,
.returnAdjustedVal = false
},
ADC_init();
ADC_Params_init(&NTC_ADCParams);
NTC_ADCHandle =ADC_open(Board_ADC0, &NTC_ADCParams);
请问如何设置呢?
Viki Shi:
CC1310 launchpad是7*7的封装,移植到4*4需要作一些修改。具体请参考下面链接:
e2echina.ti.com/…/115606
user5806587:
回复 Viki Shi:
Viki Shi老师,我用的是simplelink_cc13x0_sdk_2_20_00_38,找不到products\tidrivers_cc13xx_cc26xx_2_20_00_08\packages\ti\boards的目录啊
Viki Shi:
回复 user5806587:
没事,封装更改主要是引脚及设置的修改,步骤参考下面的step by step guide:
e2echina.ti.com/…/simplelink-mcu-cc1310-vqfn48-7-7-vqfn32-5-5
user5806587:
回复 Viki Shi:
Viki Shi老师,我按上面的文档将CC1310_LAUNCHXL.h中的CC1310_LAUNCHXL_DIO23_ANALOG~CC1310_LAUNCHXL_DIO28_ANALOG全改了一遍
(改为#define CC1310_LAUNCHXL_DIO23_ANALOG IOID_9)
同步修改例程里ADC_open函数第一个参数为CC1310_LAUNCHXL_ADC0~CC1310_LAUNCHXL_ADC5
可是还是不行啊
da qin zheng sheng:
可以在scs软件试试
user5806587:
回复 da qin zheng sheng:
谢谢 Viki Shi老师,大秦老师,问题找到了,用IDIO_8供电,IDIO_9采样,上电后没加延时,导致采样结果为0,加上延时正常了