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.

How to confirm sample rate

Other Parts Discussed in Thread: TMS320F28335

Hi,

I simply wonder how I can confirm the ADC sample rate for my TMS320F28335? Currently, I'm sampling at 12.5 MSPS according to the code, but I would like to know if this i correct. Previously I sampled a square wave of 3 MHz and counted the number of samples per wave (manually, only for about 10 waves). The result was around 11.8 MSPS. This is lower than 12.5 MSPS, so I would like to know if there are more precise measurement methods. If the square wave method is reliable, what may the reasons be for the lower sample rate?

Regards, Fredrik

  • You can try toggling a GPIO after every N conversions.  Then feed this to a frequency counter or oscilloscope and multiply the frequency by 2N to get the sample rate.  

    Simple stuff to debug observed sampling speed: Check the system clock to make sure it is as expected.  Double check the dividers that produce ADC clock from System clock.  Confirm the frequency of the external signal.  

    More likely, an issue with sampling rate is probably caused by the code.  To achieve maximum sampling rate, you need to keep the converter continuously converting without any delay cycles and using minimum acquisition window.  If you still observe <12.5 MSPS we can try looking at the code here.