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.

TM4C123G I2C Energia Pullup Wire.h

Genius 10370 points
Other Parts Discussed in Thread: ENERGIA

Team,

I am an internal TI'er and came across some off behavior while using the TM4C123G for some of my testing. I am needing to test my own chip functionality when a pullup on my I2C line goes floating mid transaction. I am currently accomplishing this by using 2 123G's where one is monitoring the clock pin(and has other pins for the pullups on the I2C lines) on the 2nd and on the XX falling clock edge it sets the pullups to an INPUT or floating. 

I was trying to accomplish this with 1 micro just to make setup easier so i was trying to set the Pins for the I2C lines as INPUT mid transaction. The odd behavior i am seeing is one of the I2C pin is staying high even after i set it to an input. I would expect both pins to follow that same behavior, whichever is intended. 

Please let me know any thoughts on how i might be able to accomplish my task.

Thanks,

Eric Vos

Vos@ti.com

  • Hello Eric,

    And what was the signal level on the IO when the pin reads High?

    Regards,
    Amit
  • Eric Vos24 said:
    I am needing to test my own chip functionality when a pullup on my I2C line goes floating mid transaction

    Eric Vos24 said:
    I was trying to accomplish this with 1 micro just to make setup easier so i was trying to set the Pins for the I2C lines as INPUT mid transaction

    I don't see how what you are doing accomplishes your state goal Eric. Wouldn't it make more sense to use an nfet/pfet combination to actually disconnect the pull-up resistor from the 3V3/5V line?

    Robert

  • Going off memory around 3.3V. like there was an internal pullup connected on the pin. i dont recall which pin it was but i think it was the data pin.
  • Hello Eric,

    Did you check if the GPIOPUR register bit for the corresponding pin is set or not?

    Regards
    Amit
  • That is effectively what i was trying to do. by setting the pins on the Micro to Input am i not making them floating. My setup with 2 micro's works great. this was more of an FYI to your team that the Data and Clk pins behave differently when put under the same conditions
  • Eric Vos24 said:
    That is effectively what i was trying to do. by setting the pins on the Micro to Input am i not making them floating.

    But that doesn't effect the pull-ups, they're external to the device.

    Eric Vos24 said:
    your team

    My team? ;)

    Robert

  • I did not. i do not have the setup handy any longer (it is under test on a co-wokers bench) i can look the next time i have the setup at my disposal.
  • Let me back up. We were trying to use Energia to set the I2C pins (PA_6,PA_7 or PD0 PD1) to have internal pull ups. then we had another GPIO pin monitor the clk line. using an interrupt we were trying to disable the internal pullups on __ Falling edge.

    The problem i am reporting we suspect to be an Energia bug. Energia will let you disable the internal pullup on PA_n but not on PA_m where PAn is SDA and PA_m is SCL". May have to switch SDA/SCL

    Again i want to stress this is not a high priority since i have it working great with 2 sources. 1 for the pull ups the other for the communication. This was more an FYI of odd behavior i was seeing. :)
  • Eric Vos24 said:
    when a pullup on my I2C line goes floating mid transaction.

    May I note that when a, "pullup" instead, "goes floating" - it no longer qualifies as, "pullup."

    Further - you make mention of "PD0" which (thoughtfully) defaults as "NMI" - thus must be specially treated (unlocked) to perform as I2C pin.

  • Eric Vos24 said:
    Let me back up. We were trying to use Energia to set the I2C pins (PA_6,PA_7 or PD0 PD1) to have internal pull ups

    You should check the values on those pull-ups. They are rather too weak for IIC as several here have found out when they didn't check.

    As is often the case the internal pull-ups are really only useful for providing weak pull-up after reset has been completed.

    Robert

  • Basically you appear to be switching between various levels of inadequate pull-up.

    Robert
  • Getting to the root of what i was trying to say boils down to this.

    Using Wire.begin() / Wire.setModule() Energia will enable an internal pullup on SDA but not SCL. There doesn't seem to be a way to disable this internal pullup via the pinMode() / digitalWrite() commands.

    When just calling setModule voltage on the pins reads 3.3V (as expected). when i add a 10K pull down resistor Clk goes to 0V and Data goes to 1.7V

    For my initial quest i was needing the Comm line to be floating. I wanted to do communication through the I2C ports on the TivaC, but with the internal pullup being there i cannot. i went to using another hardware piece for the pullup-less communication piece while still using the TivaC to monitor the Clk and apply/remove the pullups.

    I do not care one way or another which behavior is expected (i would think no pullup), i would like/expect
    1) Both pins to behave the same way.
    2) I would also like there to be a way to disable this pullup if the intended behavior is for the pullup to be enabled by setModule() through Energia.
  • Eric, it's probably worth noting this isn't an energia forum. Few, if any, people here use it.

    Robert