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.

TMS320F28379D: ADC Start of Conversion and CPU Timer

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

ADC:

I used 12 bit ADC start of conversion triggered via CPU TIMER0 for every 300ns. I got the output of ADC through ADCRESULT register. Here my doubt is as follows

1. I didn't use EOC interrupt to get result from ADCRESULT register. I directly accessed ADCRESULT register at every 300ns. I am getting the result but is there chance for missing data?

TIMER;

1.  Is CPU timer0 working in up-counting fashion or up-down counting fashion?

2. I couldn't get the purpose of the following register field. Please help on that.

CpuTimer0Regs.TCR.bit.FREE  = 0;
CpuTimer0Regs.TCR.bit.SOFT  = 0;

  • Ganeshapandi K said:
    I didn't use EOC interrupt to get result from ADCRESULT register. I directly accessed ADCRESULT register at every 300ns. I am getting the result but is there chance for missing data?

    This is dependent on your system implementation.  The RESULTS will always be updated, but whether the CPU is meeting the real-time deadline, of accessing them before they are overwritten, is dependent on your software.

    Conversions are usually buffered, with the CPU processing triggered using interrupts.  You can see this in most of the C2000Ware ADC examples:  ~\C2000Ware_XXXX\device_support\f2837xd\examples\cpu1

    Ganeshapandi K said:
    Is CPU timer0 working in up-counting fashion or up-down counting fashion?

    The behavior is described in the TRM and demonstrated by the timed_led_blink example in C2000Ware.

    Ganeshapandi K said:
    I couldn't get the purpose of the following register field. Please help on that.

    This is also defined in the TRM:

  • Thank you

    AdcaRegs.ADCSOCFRC1.bit.SOC0    = 1;
    Result   = AdcaResultRegs.ADCRESULT0

    1. In the above code after start of conversion, soon I am taking Result in the next line. If suppose first line and 2nd line takes 20ns and 15ns respectively, will the result register have correct result of sample? Since 12 bit ADC has conversion time to be 75ns, should it be necessary to wait atleast 75ns to get correct result?

    2. Does first line take 75ns itself?

  • Ganeshapandi,

    You will need to take more direct measures to synchronize the code execution with the ADC conversions.  For example, delay loops or EOC flag polling.  These are used in the C2000Ware examples that I referenced in your other thread.

    There are many factors that contribute to code execution time.  I recommend that you consider this F2837xD Workshop with associated videos for an introduction to the device architecture.

    -Tommy

  • Thank you Tlee