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 Digital Comparator trigger documentation

Is there an error in the LM4F120H5QR documentation regarding the ADC Digital Comparator trigger output?

The LM4F120H5QR Data Sheet in section 13.3.7.1, Output Functions, states: "Each comparator has two possible output functions: processor interrupts and triggers."

There section also contains a description of the Interrupt outputs, but lacks a similar description of the Trigger outputs.

The description of the ADC Digital Comparator Control registers ( ADCDCCTLn starting at offset 0x0E00) defines the bits for configuring Interrupts but not any corresponding bits for configuring triggers.

The hw_adc.h file contains bit masks for configuring the ADC Digital Comparator Control registers (for example ADC_DCCTL0_CIE or ADC_DCCTL0_CIM_M) for interrupts and also for corresponding bits for triggers: ADC_DCCTL0_CTE, ADC_DCCTL0_CTC_M, etc. There are no corresponding trigger bits defined in the LM4F120H5QR Data Sheet.

Is the LM4F120H5QR Data Sheet incorrect in stating that the Digital Comparator can output triggers?

Is the LM4F120H5QR Data Sheet incorrect in the definition of the ADC Digital Comparator Control (ADCDCCTLn) registers?

If the Digital Comparator can output triggers what do the triggers do? I have seen RTOS documentation of the ADC which states that the trigger is a "PWM fault condition". 

Donald Rich

  • Hi Donald,

        

    Donald Rich said:
    The description of the ADC Digital Comparator Control registers ( ADCDCCTLn starting at offset 0x0E00) defines the bits for configuring Interrupts but not any corresponding bits for configuring triggers.

       See Analog Comparator Control Register (ACCTL0) at the  LM4F120H5QR Data Sheet. Also see ComparatorConfigure() at SW-DRL-UG-xxxx.pdf.

    -kel

  • Both the register (ACCTL0) and the function (ComparatorConfigure) apply only to the ANALOG comparator. The issue is with the documentation of the DIGITAL comparators in the ADC peripheral.

    The Analog and Digital comparators are different peripherals.

    More recently I have found that in other Stellaris controllers (for example the LM3S9B92) the Digital Comparator trigger is used to raise a fault condition in the PWM peripheral (not to be confused with the PWM mode in the General Purpose Timers of the LM4F120H5QR) to provide a feedback if the PWM output falls outside of its normal operating band (i.e. you can set the Digital Comparator values to the below the minimum operating voltage and above the maximum operating voltage and have the Digital Comparator trigger a PWM fault if the voltage from the filtered PWM is too low or too high.

    Since the LM4F120H5QR does not have a PWM module I believe the fault is that the documentation incorrectly states that the Digital Comparators can generate a trigger (to this nonexistent peripheral).

    Donald Rich