This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

About 28,335 runs in Flash AD acquisition has the wrong question

I run the program in FLASH program sampling frequency 20K, there are always dozens per AD numerical point of collection errors, led me to set the enable flag malfunction, which is why I ask

  • Hi user3588080,Can you be more specific?
    What voltage(s) are you sampling? What channel(s) are you sampling on? What conversion results do you expect and what are you actually getting?
    Which specific enable flag do you suspect is malfunctioning?
  • I use a resistor voltage into a current, and then transferred to the secondary side by isolating the Hall sensor, by op amp filter after collection to 28335, I am now using a DC voltage to provide input for testing
  • Hi user3588080,
    When Devin asked for details, he meant about the use of the F28335 ADC. For example what ADC channels are being converted? What are the voltage levels being sampled? Simultaneous or sequential sample mode? What are you ADC settings such as ADCCLK rate, ADC_PS, ACQ_PS, etc. What are the conversion results you are getting? What conversion results are you expecting? What enable flag are you talking about? Are you using TI hardware (kit or control card) or custom HW? Do you have TI example code such as adc_soc working?
  • source file is:

    void adcpeizhi()//adc初始化配置
    {

    Uint16 i;
    //定义ADC时钟
    EALLOW;
    SysCtrlRegs.HISPCP.all = 0x3; // HSPCLK=SYSCLOCK/2/3=25M
    EDIS;

    AdcRegs.ADCTRL1.bit.ACQ_PS = 0x0; // S/Hclk = 1/ACQ_PS+1)/1/25=12.5m

    InitAdc(); //初始化ADC
    AdcRegs.ADCTRL3.bit.ADCCLKPS = 0; //不分频
    AdcRegs.ADCTRL1.bit.SEQ_CASC = 1; // SEQ1和SEQ2联合起来作为一个十六位的排序器
    AdcRegs.ADCTRL1.bit.SEQ_OVRD = 1; //存储结果连续覆盖
    AdcRegs.ADCTRL1.bit.CONT_RUN = 1; //设置为连续转换模式
    AdcRegs.ADCMAXCONV.bit.MAX_CONV1=0x1;
    AdcRegs.ADCCHSELSEQ1.bit.CONV00 = 0x8; //ADCINB0
    AdcRegs.ADCCHSELSEQ1.bit.CONV01 = 0x9; //ADCINB1
    //数组清零
    for(i=0;i<2;i++)
    {
    AdcTable[i] = 0;
    }
    }

    void adccaiji()//adc采集
    {
    AdcRegs.ADCTRL2.all = 0x2000;//启动ADC,SOC_SEQ1=1;


    while(AdcRegs.ADCST.bit.INT_SEQ1 == 0){}

    AdcRegs.ADCST.bit.INT_SEQ1_CLR=1; //清除SEQ1中断标志位

    AdcTable[0]= (AdcRegs.ADCRESULT0>>4);
    AdcTable[1]= (AdcRegs.ADCRESULT1>>4);
    AdcRegs.ADCST.bit.INT_SEQ1_CLR=1; //清除SEQ1中断标志位
    dianya=(AdcTable[0]/1365.3333+0.15)*13.877;
    dianliu=(AdcTable[1]/170.666)-18.64;
    //GpioDataRegs.GPBTOGGLE.bit.GPIO61=1;
    if(dianya>=31) {start_pwm++;}
    //if(start_pwm>8){start_pwm=8;}
    //start_pwm++;
    }