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.

TM4C123GH6ZRB: Datasheet's Explanation for I2C Configuration

Part Number: TM4C123GH6ZRB

Hi there Supporter,

TM4C123GH6ZRB's datasheet describes I2CSCL's corresponding port pin should not be configured as open drain. However, its buffer type is exactly open drain.

So, I am a little confused. Can you let me know what does the description certainly mean?

And also, the description says the pin has active pullup. Does it mean only I2CSCL has internal pullup but I2CSDA doesn't?

Regards,

S.P. Lin

  • Unsure if my presence warrants the title, "Supporter" - yet I found your post intriguing - and if you'll accept my findings based upon the far more popular  "TM4C123GH6PMI"  (MCU resident upon the "4C123 LPad) your confusion may be abated.    (one hopes...)

    The Cortex M4 as implemented by most vendors provides substantial flexibility w/in pin type & configuration.    The issue you (well) note re: "OD" suggests that "OD" may be the default value - yet in accommodation of the newer, higher speed I2C modes - that I2CxSCL pin may be placed into an active (i.e. push-pull) mode.     And in fact - vendor's API - reveals just that!     The code - rather nicely - resolves your confusion:

    void
    GPIOPinTypeI2CSCL(uint32_t ui32Port, uint8_t ui8Pins)
    {
    //
    // Check the arguments.
    //
    ASSERT(_GPIOBaseValid(ui32Port));

    //
    // Make the pin(s) be peripheral controlled.
    //
    GPIODirModeSet(ui32Port, ui8Pins, GPIO_DIR_MODE_HW);

    //
    // Set the pad(s) for push-pull operation.
    //
    GPIOPadConfigSet(ui32Port, ui8Pins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD);
    }

    So - the API code for the pin "I2CSCL" - when issued - forces the pin into "push-pull."

    Yet the plot thickens!    The MCU manual (Section 16.3) states:  "Due to the internal circuitry that supports high-speed operation, the SCL pin must not be configured as an open-drain signal, although the internal circuitry causes it to act as if it were an open drain signal.    Both SDA and SCL signals must be connected to a positive supply voltage using a pull-up resistor."

    My firm has found that it is best - always & only - to deploy "external pull-up resistors" (4K7-10K) upon both pins!    (internal MCU pull-ups prove too high in value - introduce signal reflections & rounded edges.)

    I believe your issues have been covered - and that justification for each assertion has been provided.     (this may be yet another case where the, "lack of mention of the API - w/in the MCU Manual" aids/abets confusion.)      (hopefully now resolved...)

  • Where is the LIKE button????
    [LIKE] <====
    Consider pushed!
    By the way, an attempt we made a couple of years past, to establish I2C communication to a target without any pull-ups, configuring the MCU pad as WPU, resulted a "successful test": as in "the TEST proved the communication bus does not work!"
    Bruno
  • Geez Bruno - cannot you afford a (proper) push-button? (your "single push" generated 26 LIKEs - (some) debounce (may) be indicated...) The (alleged) forum upgrade provides "gifts" which "keep on" giving!

    Indeed - under superlative conditions - MCU's internal resistors (may) appear to work. Yet - under time, temperature, aging (i.e. real world condx.) - any (savings) will be quickly & comprehensively "exhausted" - due to that "Risk INVITING" attempt @ saving!