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.

TMS320F28035: Getting different result when reading ADC result for 2 times

Part Number: TMS320F28035

Hi team,

I met a ADC question from my customer and I would like to hear your advice.

As you can see, the control frequency they are using is 100kHz which means the control period is 10us. Within one period, they do two samples at CTR=0 and CTR=PRD. The ADC conversion time takes less than 1us in total. According to our understanding, the result will be store in ADC result register which will not change until the next conversion.

At t=3us and t=4us, they read the ADC result register twice in their algorithm. The problem is there is a possbility that they will get 2 different results. However, the should get two exactly same result since there is no another conversion between these two reading.

Thus, my question is why they would get different result sometimes? I understand they can only read the register one time and assign a varible to do the further calculation. But my customer is curious about what cause this problem. 

Thanks,

Brian

  • Brian,

    From prior experience and understanding of the ADC, I can assure you that the ADCRESULT value is static between conversions.

    Based on the observations, it would seem that one or more of the below assumptions might be wrong:

    • ADC is triggered exactly at TBCTR=0 and TBCTR=PRD
    • ADC conversion time from trigger to ADCRESULT latch is < 1us
    • The ADCRESULT is read at 3us and 4us after trigger

    I recommend checking on the assumptions to confirm if they are true. Logging the TBCTR and TBSTS[CTRDIR] values is useful for profiling elapsed time. The ADC conversion time can be inferred by triggering an ISR with the late ADCINT interrupt.

    -Tommy

  • Hi Tommy,

    Understand your concern.

    I was also doubting another ADC conversion is triggered in addition to TBCTR=0 and TBCTR=PRD, which caused the ADC result to change between 3us and 4us. I have also suggested customer to check the configuration of ADC trigger to find out what the reason is.

    Just wrote this post to make sure this is not a known problem and our understanding is right.

    Any further update, I will let you know.

    Regards,

    Brian

  • Closing this thread and following here instead: e2e.ti.com/.../806153