Hi,
I am using the TM570 USB Development kit and I am having a problem setting the A/D sampling rate. Using HAL Code Generator I am enabling pin 0 of ADC 1 to sampling rate of 3.5us, in continuous mode. All other pins and ADC2 are disabled.
However, when I analysis the A/D results using a function generator input and FFT I come to the conclusion the sampling rate is 3.6393us, or about 4% longer than expected. Increasing the sample rate to 350us the % error is much less. So I suspect their are fixed number of clock cycles inbetween each A/D or it is being interrupted.
I’ve verified the crystal is 16 MHz, so the clock should be correct. Any other ideas? Are there a number of clock cycles the state machine must work through between each continuous conversion? Does DMA steal cycles from the ADC? Does the CCS debugger steal cycles from the ADC? Is there an independent method I can use to verify the actual A/D sample rate?
thanks
steve
HCK = 100MHz
VCL =HCLK/2 = 50Mhz
PS = 4
Cycle time = 100.0 ns (10 Mhz)
Discharge time = 0
Sample Prescaler = 20
Sample time = 2200 usec
Conversion time = 1.300 usec
Total Time = 3.5usec