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.

请问28027中如何实现使用Timer实现对ADC的触发?

Other Parts Discussed in Thread: CONTROLSUITE

ControlSuite中的ADC例程是使用PWM触发ADC,请问如何设置能实现Timer触发ADC,求相关v200版本的设置程序,谢谢。

  • 将对应的SOC的ADCSOCxCTL寄存器的TRIGSEL位设置为对应的值即可,其它不需要改变,查看一下ADC User Guide了解一下。

    如果在v200上,以SOC0为例,只要将ADC_setSocTrigSrc(myAdc, ADC_SocNumber_0, ADC_SocTrigSrc_EPWM1_ADCSOCA);中的ADC_SocTrigSrc_EPWM1_ADCSOCA换成ADC_SocTrigSrc_CpuTimer_0即可。

    当然,前提是定时器你已经自己设置好了。