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.

TM4C1294KCPDT: Experiment outputs to analog

Guru 56033 points
Part Number: TM4C1294KCPDT


Attempted to make comparator outputs per (Fig. 22-2) disable analog barrier (dotted line GPIO I/O pad) and enable digital barrier XOR outputs also feeding M0Fautls inputs.

They seem broken after returning back to way before experiment was preformed. Have checked XOR (presumably GPIO outputs) each M0Faut0,1,2 input pins via Ohms & diode, e.g. (0.687Mohm / 0.872v drop) all pins measure same value and have typical GPIO readings.

So what happen to club outputs after configure XOR outputs (not inputs) thinking by mistake, analog outs going into PWM0 M0faults pins? Should comparator INTS work to trigger M0Faults internally? Might the INTS have less propagation delay (less noise) than a signal sent via GPIO into another GPIO, since traces PD0,1,2 go under MCU to MoFault0,1,2

   

  • Hi BP101,
    Sorry, but I don't understand the question. Is this post a continuation of something else?
  • Hi Bob,

    Not continuing rather all new and improved subject mater relative to the fire storm said analog (peripheral) created.

    The question was how could configuring Co0,1,2 analog outputs being analog / HW peripheral thus destroy the outputs or the digital inputs they were connected to? The outputs seem to become nonfunctional when configuration was returned digital output. GPIO pins no long output or trigger NVIC interrupts if or when analog INTS are enabled too. The idea behind that was to configure the analog comparator outputs (dotted lines) for peripheral direction, analog output HW order to clear the DEN bits and set AFSEL bits. IS it not an oxymoron seeing an XOR gate inside an analog peripheral?

    The bigger question in my mind is why is the analog comparator not being configured as a peripheral as the datasheet first suggests. Also datasheet specify the Cn+/- inputs clear the DEN bits and set AFSEL seem to indicate a peripheral configuration, however Tivaware call ConfigureComparator() does neither of these REG configurations. That alone seems to overwhelm any deductive reasoning when Cn+/- are checked via CCS debug for having a single external GPIO pin (PC6) and seems ok despite claims of comparator being a peripheral function.

    The problem becomes Tivaware call ConfigureComparator() seems to contradict datasheet claim the analog comparator is a peripheral, neither ANIx or Special function can be claimed being a peripheral too. Does not the Analog Comparator attempt to defy logic where the analog I/O pad isolation barrier must be disabled from digital I/O pad. Are we to then assume all Cn+/- inputs default to the MCU pins even being dubbed peripheral? Perhaps it is only part peripheral and datasheet fails to elaborate how the MCU input pins default to being analog and magically clear the DEN bits, set AFSEL bits for peripheral. You can't have it both ways or the defined GPIO I/O pad barrier logic becomes clouded in the process and seemingly provides no isolation in the configuration.

    Example; GPIOPinTypeCompartator() help text states GPIOPinConfigure() must be called after, though there are no I/O pad decodes (5) for Cn+/- INPUT pins listed in (pin_map.h). So it seems we don't need to call GPIOPinConfigure() for the Cn+/- inputs of typical HW direction peripheral requires. How has the AFSEL bits been set in ConfigureComparator() per datasheet 22.2? That issue then gets questionable as one attempts to configure C0+ PINO as an GPIO input for external +VREF using the MCU pin and it seems to fail at any threshold setting.

    22 Analog Comparators: An analog comparator is a peripheral that compares two analog voltages and provides a logical output that signals the comparison result.

    22.2

    The following table lists the external signals of the Analog Comparators and describes the function of each. The Analog Comparator output signals are alternate functions for some GPIO signals and default to be GPIO signals at reset. The column in the table below titled "Pin Mux/Pin Assignment" lists the possible GPIO pin placements for the Analog Comparator signals. The AFSEL bit in the GPIO Alternate Function Select (GPIOAFSEL) register (page 768) should be set to choose the Analog Comparator function. The number in parentheses is the encoding that must be programmed into the PMCn field in the GPIO Port Control (GPIOPCTL) register (page 785) to assign the Analog Comparator signal to the specified GPIO port pin. The positive and negative input signals are configured by clearing the DEN bit in the GPIO Digital Enable (GPIODEN) register. For more information on configuring GPIOs, see “General-Purpose Input/Outputs (GPIOs)” on page 740.

  • Logical output in my mid is hardly digital (H/L) as defined by the electrical specification section describing the voltage levels for a binary (1/0).

    That logical output should produce linear slope relative to the (Cn-) input slope of the threshold signal that crated the output. Especially in light of the XOR shown in the analog block assumed not being a Schmidt triggered GPIO output since it is part of the analog peripheral producing the Logical Output.
  • By word logical the output may produce a brief slope relative to Cn- inputs crossing threshold C0+ VREF thereby creating latency in the output rising edge relative to crossing events. That is typical AC output behavior as illustrated in some AC datasheets as input over drive response time graphs.
     
    Point is again typical AC's do not produce digital outputs unless modified to do so. Fig 22-2 seems to indicate a modified comparator function imbedded into the GPIO I/O analog pad by design? How does AC escape from AMSEL bit configurations, the ANIx pins do require?

    Are the AC outputs Co1,Co2,Co3 thus exempt from the rules of the GPIO analog I/O pad required disabling ANIx or analog pins barrier via GPIOAMSEL bits register? Perhaps some information has been left out of datasheet to clarify how the XOR output disables or even enables the analog isolation barrier in this area of the analog I/O pad by only calling ConfigureComparator() or GPIOPinTypeComparator() which neither one set bits in GPIOAMESL REG21. If AC outputs are not made isolated by AMSEL bits then what or how does it disable the analog isolation barrier into the XOR inputs?

    My experiment to make XOR output be analog HW direction inside the peripheral seems to have burned the XOR output. Perhaps one way to be assured the analog isolation barrier was enabled is by burning out the XOR gate drive in the analog I/O pad?

  • BP101 said:
    Point is again typical AC's do not produce digital logical output.

    COMPLETELY DISAGREE!     For easily - the TENTH TIME!     You have YET to provide "one iota" of support - for your (CONTINUED) erroneous claim!

    Also -  "AC" is not generally employed as any "recognized" abbreviation for,  "Analog Comparator."     Your writing - is perhaps  "challenging enough" - w/out tasking your reader w/"Non Standard Abbreviations."

  • Look above posted overdrive graph and Fig 22 has been modified for digital via addition of an XOR gate, that is an undeniable truth.

    Digital device outputs toggle specifically to applied input voltage (preset thresholds) by producing specific output levels relative to binary digit 0/1 at the input. That in my mind clearly divides analog comparators from ever being true digital devices. Fact is many comparators have OP amp origins making them linear behaving devices capable of multitudes of output levels not simply preset level 1/0.
  • What to say - I "Leave you to your (highly unique) beliefs."    

    Is the, "Point"  (as you like to say) - simply that your "belief" (repeatedly) FAILS YOU - (your MCU's Analog Comparator - STILL does NOT Work - your way) - while the multitude of (other) users - regularly SUCCEED! 

  • So you would then have us believe a logic gate thus produces gain on the output as comparators do? Does that gain not clearly land typical analog comparators in the linear class of devices?

    There is a very clear line between that which defines a device being digital and that which defines it being analog. Just because some folks choose to cross the line and loosely use the word digital does not make it proper to follow them over the cliff.

  • BP101 said:
    loosely use the word digital does not make it proper to follow them over the cliff.

    My friend - is it not,  "RESOUNDINGLY  YOU" -  ALWAYS & ONLY -  PURCHASING such,  "CLIFF-SIDE  PROPERTY" ... and IN BULK?     Yet (how many) will,  "follow you?"

    I have honored  your request for Chicago's Listing of:  "Skilled Orthopedic Surgeons" (via PM) - yet I am informed that  FEW (very few) will  "Entertain (your required)  'CLIFF-SIDE'  HOUSE CALLS"...

    Be (otherwise) well...

  • Sorry Bob,

    I do not understand the lack of any proper response from TI to such a simple question. Either the analog comparator (AC) peripheral is isolated by design in the GPIO analog I/O pad or not. Otherwise it requires proper Tivaware configuration to gain such proper isolation which has not been done by Tivaware ConfigureComparator().

    Specifically for the digital input, XOR output isolation of the AC Cn- inputs. Point is GPIOPinTypeComparatorOutput() does not seem to disable the analog isolation barrier, judging by rules of AMSEL register and other shared analog ANIx inputs. Just so happens the Co1,Co2,Co3 outputs fall on three ANIx GPIO input pins.

    That alone seems to suggest the analog isolation I/O barrier comes in close contact with the AC peripheral XOR outputs.

    Reason enough to question the Tivaware function calls, besides the comments attempting to divert the subject in the opposite direction.
  • BP101,
    Sorry, but my lack of response comes from simply not understanding your questions. I think my lack of understanding comes from not realizing you may be starting from a fundamental misconception. The output pins of the Analog comparators are digital, not analog. The Analog Circuitry Isolation Circuit shown in Figure 10-2 only applies to the ADC input pins and should only be disabled when that pin is used for ADC conversions.
  • Bob Crosby said:
    you may be starting from a fundamental misconception. The output pins of the Analog comparators are digital, not analog.

    Thank you - may it be noted that several here (to include Vendor's Ralph)  - repeatedly - have advised poster of  (this particular)  misconception.    

    Perhaps with "yet another" arrival of  "SUCH FUNDAMENTAL" - poster will  ACCEPT REALITY.    (maybe)

  • Bob Crosby said:
    The output pins of the Analog comparators are digital, not analog

    I realize the analog comparators output has been modified with XOR to make it digital but that does not automatically produce analog isolation in the GPIO I/O pad per datasheet text.

    Bob Crosby said:
    The Analog Circuitry Isolation Circuit shown in Figure 10-2 only applies to the ADC input pins and should only be disabled when that pin is used for ADC conversions.

    If that is true what or how are the analog comparators inputs or output (inside dotted line Fig-22-2) disabling the analog isolation barrier in the GPIO I/O pad? You can't re-write the GPIO isolation barrier rules then leave out supporting information as to how the analog comparator gains the very same isolation from digital as ANIX pins do by setting bits in the AMSEL register.

    Seemingly there is no analog comparator input/output isolation in the GPIO analog I/O pad for the comparator pins in column 1 of table 10-2. For anyone paying attention the analog comparator violates the rules of analog isolation barrier the ANIx pins must partake of. Simply because the datasheet text does not elaborate how the analog comparator peripheral gains any isolation in the GPIO analog I/O pad from digital pins sharing the same I/O lines. Why would anyone ever assume analog comparator (peripheral) is magically exempt from the same rules of the ANIx pins in table 10-2?

    The only way isolation then occurs is if it was created by silicon design so the GPIO digital I/O pad is disconnected from the analog comparators inputs/output in the dotted line Fig22-2. Why would TI want anyone to assume analog comparator input/outputs are not being isolated in the same way as the ANIx pins in the GPIO I/O pad? Analog is analog and table 10-2 suggest ALL analog input pins must be isolated in the GPIO I/O analog pad by disabling analog input pins via GPIOAMSEL register. More specifically since Analog Comparator is a peripheral and  configured in the same way as other peripherals, the entire subject becomes controversial. 

    It is not required to call GPIOPinTypeComparator() for the (Cn-) pins to pass input analog signals simply after calling ConfigureComparator(). Calling GPIOpinTypeComparator() does not disable or produce an analog/digital isolation barrier in the GPIO I/O pad. The datasheet text does not show how such isolation is achieved by configuring (Cn-) inputs (Analog / IN) without setting bits in GPIOAMSEL register. Likewise GPIOPinTypeComparatorOutput() is not set HW direction as all other peripheral GPIO pins are.

    Anyone then might assume all other peripheral GPIO pins except (Analog Comparator peripheral outputs) are configured for HW output direction? That automatically creates an isolation barrier in the GPIO (analog) I/O pad? Like to know where this has explicitly been clarified in datasheet how the analog comparator is exempt in all barrier constraints of GPIO I/O pads (Fig 10-1/10-2).

    It seems from the datasheet text these analog comparator peripheral pins are not being isolated at all. It's important to know for sure how the analog comparator peripheral thus gains any digital isolation barrier or discontinue use of them to monitor analog signals.

    .

  • Analog comparators do not produce digital outputs, they produce linear rise/fall even when modified by attaching a logic gate on the output as Fig.22-2 over whelming illustrates as XOR gate was added. The input to the XOR from the comparators output is not digital in any way, it remains linear.

    Digital logic gate outputs do not produce (current gain) as do comparator outputs by design, indeed again that classifies comparator outputs as linear!

    That is not even being disputed in this post or any other posts relative to Figure 22-2.
  • BP101,
    There are special isolation gates on the Analog to Digital Converter input pins because those pins all route to an analog multiplexer. The analog multiplexer is an array of MOSFET switches with one side of each switch tied together in common at the sample capacitor. While the switches are good at isolation, they are not perfect. To avoid analog input pins which are not being used by the ADC from creating noise on the analog multiplexer, the additional isolation circuit was added.

    The inputs to the analog comparator do not share a common analog multiplexer. There was no need to add additional isolation.
  • BP101 said:
    Analog comparators do not produce digital outputs,

    Interesting comment. The op-amp, that makes the heart of the comparator has no feedback. Therefore the output swings to the positive rail or ground depending on the relative voltage of the two inputs. You can call that an analog output, but it will be in one of two states, or in the process of transitioning. After all, all circuits are analog. Those that tend to saturate in a "high" or "low" state, we call digital.

  • Hi Bob,

    Could someone please add analog comparators isolation block into I/O pad Figure 10-2 so it makes sense from a GPIO pin perspective, apparently it was left out. About the Tivaware calls mentioned,  which ones are valid and which ones may cause mayhem?  Don't need answer right away but it might behoove the community to know for the TM4C1294 is perhaps different than TM4C123G in that regard. Perhaps calling GPIOPinTypeComparator() for the Cn-/+ analog inputs keeps analog noise off the GPIO pad?

    Bob Crosby said:
    Those that tend to saturate in a "high" or "low" state, we call digital.

    That may not be proper name calling and factually the analog comparator output by it's self is not a true digital endpoint, thus behaving more linear. Mostly that the output fails to produce the necessary and quantifiable aspects of a logic gates output reaching rise/fall times of <20ns with little latency or propagation delay. Otherwise it's like calling a chicken a hen before it ever laid an egg, albeit hens do lay eggs but do chickens? LOL

    Interesting piece from New Japan Radio NJM2901 comparator:

    These devices offer higher frequency operation and faster switching than can be had from internally compensated quad op amps. Indeed for single-supply applications, the Darlington PNP input stage allows them to compare voltages that include ground.
    The two-stage common-emitter output circuit provides gain and output sink capacity of 6mA at an output level of 400mV.The output collector is left open,permitting the designer to drive devices in the range of 2V to 36V.