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.

TMS320F28377D: I2C-A problem

Part Number: TMS320F28377D


Hi champs,

My customer uses GPIO42 and GPIO43 as I2C-A function, finds that I2C function works well when SCL frequency is 100KHz and fails to work when SCL frequency set to 400KHz.

The GPIO42 and GPIO43 are pins for USB function, I am wondering is there any usage limitation when set these two pins as I2C-A function?

Regards,

Luke

  • Hi Luke,

    What does the 400 KHz failing case appear like? Is it causing bit errors, NACKs, or something else? It could be that a stronger pull-up resistor (lower resistance) is needed if you're just seeing a lower clock frequency on SCL.

    Is the C2000 device configured as a master or slave device?

    Best,

    Kevin

  • Hi Kevin,

    C2000 device is configured as I2C master.

    The I2C module works well at 100KHz SCL and fails to work with 400KHz SCL signal, please refer to below pictures. Because GPIO42 and GPIO43 are USB pins, I am wondering is there any usage limitation when configuring these two pins as I2C-A function pins.

    Please help to check and advise your comments, thanks for your help.

    ** I2C 100KHz, it works well.

    ** I2C 400KHz, I2C module even cannot generate correct SCL signal.

    Regards,

    Luke

  • Hi Luke,

    You should still be able to achieve 400 KHz I2C comms with GPIO42/43. The USB signals existing on these signals won't prevent 400KHz I2C from being achieved, however stronger pull resistors may be needed compared to other I2C pins.

    It looks like the SDA rise time is longer than it ideally should be for Fast mode I2C and that's causing it to fail.

    What external pull-up resistor value is being used on SDA and SCL? Also is the internal pull-up resistor enabled or disabled?

    Please try using ~2k pull-up resistors without the internal pull-up enabled on the pin. I've seen that work in the past.

    Best,

    Kevin

  • Kevin,

    According to my customer, he disables internal pull-up and use external 1K Ohm pull-up resistors so that this I2C function works well, 2K Ohm resistor is not small enough.

    If we refer to application report SLVA689, the recommend minimum pull-up resistor is 966 Ohm. Is there any side effort if the external pull-ups are smaller than 966 Ohm please?

    https://www.ti.com/lit/an/slva689/slva689.pdf?ts=1625451558065

    Regards,

    Luke

  • Hi Luke,

    OK, that's good you found a resistor value that works and the relevant app note to reference.

    If we refer to application report SLVA689, the recommend minimum pull-up resistor is 966 Ohm. Is there any side effort if the external pull-ups are smaller than 966 Ohm please?

    The main concern with having a pull-up resistor that's too small (too strong) is the below from the AN. That SDA/SCL line may not be able to be pulled down to the required V_OL level.

    ~1k pull-up resistor value may be OK and depends on the amount of capacitance are on the lines (which may be higher in this case). Please see the AN Figure 3 "Maximum Pullup Resistance [RP(max)] vs Bus Capacitance (Cb)", check the Fast mode line as it's close to ~1k.

    If the customer is OK with a slower I2C speed (<400 KHz) they can use a larger (weaker) pull-up resistor. Fast mode I2C does not have to be exactly 400 KHz keep in mind.

    Best,

    Kevin