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.

ADC Comparator, multiple inputs

Using a TMS4C129 variant.

So far I have been able to use either SYS/BIOS or TivaWare for all communication with devices, but from what I can see, there is not support for what I would like to do with the ADC.

I would like to:

  • Continuously monitor three ADC inputs
  • Each input would have a different comparator assigned to it
  • All comparators are configured to interrupt using High band Hysteresis Once
  • ISR would increment a different variable for each input
  • I am not interested in looking at the ADC samples, just counting how often the comparator criteria are met.

From what I can see, the TivaWare drivers do not support this.

I don't see how to associate a specific input to a comparator, or a comparator to a specific sequencer.

Is what I desire possible?

Do you have a similar example you can point me to?

  • Hi Greg,

    You're correct that TI-RTOS does not have an ADC driver for the TM4C devices. I've moved your thread to the device forum. They can better answer the TivaWare part of the question.

    Todd
  • Hello Greg,

    First of all let me clarify: TI RTOS embeds the TivaWare drivers. The TivaWare drivers have the API for configuration, however it is not wrapped in a TI RTOS driver.

    The TivaWare drivers need to be called in the application in this case to configure the ADC sequencer for Digital comparator. The interrupt will be triggered on the calling sequencer.

    An example is not there but surely there must be something on the forum, or else you may begin the coding in TivaWare a basic example, that we can help you build till it works and then you may embed it in the TI RTOS.

    Regards
    Amit
  • What I didn't see in the docs were the bits you could add to the ADCSequenceStepConfigure call to associate comparators with ADC pins.

    I see that now and have figured out how to do it.

  • Hello Greg,

    Great to hear that.

    Regards
    Amit