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.

关于28335ADC初始化几个延时的作用

在28335ADC初始化的例程里有这么几行代码

// To powerup the ADC the ADCENCLK bit should be set first to enable
// clocks, followed by powering up the bandgap and reference circuitry.
// After a 5ms delay the rest of the ADC can be powered up. After ADC
// powerup, another 20us delay is required before performing the first
// ADC conversion. Please note that for the delay function below to
// operate correctly the CPU_CLOCK_SPEED define statement in the
// DSP28_Examples.h file must contain the correct CPU clock period in
// nanoseconds. For example:

AdcRegs.ADCTRL3.bit.ADCBGRFDN = 0x3; // Power up bandgap/reference circuitry
DELAY_US(ADC_usDELAY); // Delay before powering up rest of ADC
AdcRegs.ADCTRL3.bit.ADCPWDN = 1; // Power up rest of ADC
DELAY_US(ADC_usDELAY2); // Delay after powering up ADC

其中两个延时时间和作用也都做了说明和注释但是我想知道的是这个延时时间是怎么计算出来的。有什么理论依据?

而且在controlsuit例程里有几个例子是直接这样写的:

AdcRegs.ADCTRL3.all = 0x00E0; // Power up bandgap/reference/ADC circuits
DELAY_US(ADC_usDELAY); // Delay before converting ADC channels

感觉这种写法和他前面的注释是自相矛盾的。


另外我最近一个客户遇到一个问题,他们有一批28335芯片在高温下(70度左右)启动运行时,ADC采样结果会非常不准(并不是每次都出现),后来将上面的延时改为15ms才得到解决,所以感觉就很困惑,这个时间到底该设置为多少?按理说ti在datasheet里提供的数据应该是经过测试后给出的。

希望大家多给一些思路哈,非常感谢。