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.

TMS320F280049C-Q1: TMS320F280049C-Q1

Part Number: TMS320F280049C-Q1
Other Parts Discussed in Thread: TMS320F280049C

Hi there,

I am using tms320f280049c controller. I had a doubt regarding ADC. If I want to know the end of conversion (EOC) status without generating ADC interrupt, how can I do it? Please someone let me know it.  

Thanks and regards, 

Akshay 

  • Hi Akshay,

    EOC only goes to the ADC interrupt logic (per TRM chapter 13.7).  Wanted to understand your concerns in generating interrupt.  Maybe we can address that.

    Best regards,

    Joseph

  • Hi Joseph,

    I cannot use interrrupt  in our project due to functional safety concerns. I can use delay to get conversion done but thats inefficient. thats why I am thinking of something else !

    Maybe I can block the process of interrupt propagation towards CPU?

    Thanks and regards,

    Akshay

  • Hi Akshay,

    There are bits and fields in ADCCTL1 register that you can poll like ADCBSY and ADCBSYCHN and register ADCSOCFLG1.  These would give indication whether the ADC is converting (busy), what was the last SOC that has converted or is currently converting or which SOC received a trigger.  You could potentially write a routine to poll these registers as to when trigger to start conversion has been received.  There is a free running 12-bit clock, ADCCOUNTER,  that counts with respect to SYSCLK, which is the same clock that gates conversions (S/H, EOC,  quantization  - refer to the ADC timing diagrams in TRM chapter 13.12).  There is an accompanying table with the timing diagrams that indicate how many SYSCLK cycles it takes, after SOC S+H has expired when tEOC and tLAT (latency time for quantization - digital value will be available in ADC results registers) events will have occurred.  The table would have different values for tEOC and tLAT depending on prescalers used.

    There will be caveats when using the above registers:  Register polling will have CPU overhead and that the free running counter will overflow after 4095 SYSCLK counts and would restart again so you would need to take care of this.  The CPU overhead in reading the SOC start/trigger and ADC counter will be significant and might end up missing the tEOC/tLAT event and could lead to incorrect results being read from the ADC results register.  Have not tried this method and we do not have examples for this as well but is is something that you can potentially try and experiment with.

    Best regards,

    Joseph