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.

TMS320F2800157: 如何用定时器触发ADC采样

Part Number: TMS320F2800157

如何用定时器触发ADC采样?

以下的例子好像不行,软件读ADC的采样值时,读出来的一直是0

请给个例子

CPUTimer_setPeriod(CPUTIMER_FOR_ADC_SAMPLE, DEVICE_SYSCLK_FREQ/(200L * 1000));  // timer频率200K
CPUTimer_setPreScaler(CPUTIMER_FOR_ADC_SAMPLE, 0);
CPUTimer_stopTimer(CPUTIMER_FOR_ADC_SAMPLE);
CPUTimer_reloadTimerCounter(CPUTIMER_FOR_ADC_SAMPLE);
CPUTimer_resumeTimer(CPUTIMER_FOR_ADC_SAMPLE);

ADC_setupSOC(VO_ADC_BASE, VO_ADC_SOC_NO, ADC_TRIGGER_CPU1_TINT0,
                           VO_ADC_PIN, 100);  // 配置timer触发ADC采样