我在appcenter里面下载了TI ARM Compiler,可是还是报同样的错误,我该怎么做,假如这个问题不解决,新建的工程能够正常使用吗
xyz549040622:
1.你用的是哪个版本的库呢
2.你用的是CCS6.0吗
我安装两者的最新版本,直接导入工程编译时没有问题的。
你现在的编译器版本是哪个呢?是不是你没选择对呢?
chang liu11:
回复 xyz549040622:
我用的是ccs6.0,固件库和你一样,另外我添加了一个uartstdio.c这个文件就没有错误了
int main(void){ uint32_t ui32ADC0Value[1]; volatile uint32_t ui32TempAvg; volatile uint32_t ui32TempValueC; volatile uint32_t ui32TempValueF;
SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|SYSCTL_XTAL_16MHZ); InitConsole();
// // Display the setup on the console. // UARTprintf("ADC ->\n"); UARTprintf(" Type: Internal Temperature Sensor\n"); UARTprintf(" Samples: One\n"); UARTprintf(" Update Rate: 250ms\n"); UARTprintf(" Input Pin: Internal temperature sensor\n\n"); //5??,??PLL,????16M,system????? main osc?????40MHZ SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0); //??ADC0 ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_PROCESSOR, 0); //We want to use ADC0, sample sequencer 1, //we want the processor to trigger the sequence and we want to use the highest priority //ADCSequenceStepConfigure(ADC0_BASE, 1, 0, ADC_CTL_TS); //ADCSequenceStepConfigure(ADC0_BASE, 1, 1, ADC_CTL_TS); // ADCSequenceStepConfigure(ADC0_BASE, 1, 2, ADC_CTL_TS); //Configure steps 0 – 2 on sequencer 1 to sample the temperature sensor (ADC_CTL_TS). ADCSequenceStepConfigure(ADC0_BASE,3,0,ADC_CTL_TS|ADC_CTL_IE|ADC_CTL_END); //Sample the temperature sensor (ADC_CTL_TS) and configure the interrupt flag (ADC_CTL_IE) //Tell the ADC logic that this is the last conversion on sequencer1 (ADC_CTL_END). ADCSequenceEnable(ADC0_BASE, 3); //enable ADC sequencer 1 while(1) { ADCIntClear(ADC0_BASE, 3); ADCProcessorTrigger(ADC0_BASE, 3); //trigger the ADC conversion with software while(!ADCIntStatus(ADC0_BASE, 3, false)) { } //wait for the conversion to complete ADCSequenceDataGet(ADC0_BASE, 3, ui32ADC0Value); ui32TempAvg = ui32ADC0Value[0]; //Since 2/4 = 1/2 = 0.5, 1.5 will be rounded to 2.0 with //the addition of 0.5. In the case of 1.0, when 0.5 is added to yield 1.5, this will be rounded //back down to 1.0 due to the rules of integer math.????? ui32TempValueC = (1475 – ((2475 * ui32TempAvg)) / 4096)/10; //TEMP = 147.5 – ((75 * (VREFP – VREFN) * ADCVALUE) / 4096) //VREFP – VREFN=3.3V ui32TempValueF = ((ui32TempValueC * 9) + 160) / 5; UARTprintf("Temperature = %d*C or %d*F\r\n", ui32TempValueC, ui32TempValueF); //F = ( C * 9)/5 +32 }}
黄色部分是我修改的,输出的数据就和修改前不一样了输出一会后还报错了
CORTEX_M4_0: GEL Output: Memory Map Initialization CompleteCORTEX_M4_0: Error: Timed out while waiting for target powerup/polling a hardware resource.
chang liu11:
回复 xyz549040622:
这个情况困惑我,为什么sequence改变后,内部温度输出就变化了,差距还挺大,还有如果一直让板子开启温度过一会儿会变大,这个应该是正常的,编译器我下载了(ti_cgt_tms470_5.2.9_windows_installer),现在是ARM5.2
非常感谢,我感觉我离成功进了一步了
xyz549040622:
回复 chang liu11:
//ADCSequenceStepConfigure(ADC0_BASE, 1, 0, ADC_CTL_TS);//ADCSequenceStepConfigure(ADC0_BASE, 1, 1, ADC_CTL_TS);// ADCSequenceStepConfigure(ADC0_BASE, 1, 2, ADC_CTL_TS);
要变为序列通道3,你第二个参数就没变。。肯定就出问题了。
chang liu11:
回复 xyz549040622:
第二个参数,这个怎么没有看明白
chang liu11:
回复 xyz549040622:
第二个参数,怎么没有看明白,是哪个参数,你列的这三行,我不是把他变为注释了吗
xyz549040622:
回复 chang liu11:
看到了。没注意你的那么多屏蔽信息。
chang liu11:
回复 xyz549040622:
那为什么不一样呀
chang liu11:
回复 xyz549040622:
请问一下,我研究生要专门搞嵌入式,但是本科没有学过,请教一下有什么建议,还有资料的