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.

[参考译文] TMS570LS0714:TMS570ls0714 ADC 在循环时卡在对话中

Guru**** 2524550 points
Other Parts Discussed in Thread: HALCOGEN

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/986670/tms570ls0714-tms570ls0714-adc-stuck-in-conversation-while-loop

器件型号:TMS570LS0714
主题中讨论的其他器件:HALCOGEN

我正在尝试使用 TMS570lS07中的 ADC 读取电压、并且我已经完成了(ADC 显示)帮助主题中的所有指令、但我的 ADC 不起作用、并且在 while ((adcIsConversionComplete (adcREG1、adcGROUP1))=0)中存在残桩; 此外,该标志的返回值为0,因此,是否有人可以帮助我们解决此问题??

#include "sys_common.h"
#include "system.h"

#include "esm.h"
#include "adc.h"
#include "gio.h"
#include "het.h"




adcData_t adc_data[4];
void wait(uint32 time);



void main(void)
{
    uint32 ch_count=0;

    gioInit();
    hetInit(),
    adcInit();


    while(1) /* ... continue forever */
    {


        adcStartConversion(adcREG1,adcGROUP1);


        /* ... wait and read the conversion count */
        while((adcIsConversionComplete(adcREG1,adcGROUP1))==0);
        ch_count = adcGetData(adcREG1, adcGROUP1,&adc_data[0]);

        ch_count = ch_count;

    }
}


void wait(uint32 time)
{
    while(time){time--;};
}
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    如果 ADC 组1配置为 SW 触发、则可以通过调用 adcStartConversion (adcREG1、adcGROUP1)来启动转换。

    如果 ADC 组1配置为硬件触发、则应在调用 adcStartConversion (adcREG1、adcGROUP1)后应用触发信号。 可以从 HALCOGen GUI 中选择更强的源。