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.

PinMux Utility generates input pin code for analog comparator output pin

In using the PinMux Utility (Version 1.0.1), it appears the code generated for the Analog Comparator's output pin (C0o or C1o on the LM4F120H5QR) is configuring the output pin as an input by calling the GPIOPinTypeComparator() function, which is used to configure the input pins of the Analog Comparator.

In the Stellarisware Peripheral Driver Library, there does not appear to be an API function to specifically configure the output pin of an Analog Comparator. Instead, the GPIODirModeSet() and GPIOPadConfigSet() functions have to be used with the appropriate parameters to have the output of an Analog Comparator routed to its designated output pin.

Dan

  • Dan K said:
    API function to specifically configure the output pin of an Analog Comparator.

    Keep in mind - StellarisWare - bulk of APIs developed long before "MCU's analog outputs" were introduced.  Believe this to be the cause of confusion you properly note...  And as the analog comparator output is digital (on/off) such uncertainty is understandable.  API's brevity in great need of amplification - greater care/detail - in this regard.

    As stated previously - (other of your posts in this, "PinMux Utility" series) - our group appears not to fully "trust" this tool in its early stages.  (i.e. not too many "aged" test pilots)

    There's a critical precaution especially when configuring PF0 - which serves as analog comparator output.  (on many M4 devices)  PF0 defaults to NMI role - highly specialized, "unlock" procedure must be employed to, "re-purpose."  Our group would not trust this level, "sequenced detail" to "so newly introduced" a tool...