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.

TMS320F28335: not driving GPIO32 and GPIO33 in I2C communication

Part Number: TMS320F28335

I am currently working on i2c communication between Raspberry pi 3 and DSC TMS320F28335. I have just observed that after sending data for some time GPIO32 and GPIO33 are permanently held at a particular voltage (i.e. 400mV and 1V respectively). I am using pull up resistor of 1K. Please help. 

  • Hi Bhismadev,

    It seems your I2C signals are being held low for some reason.

    What device is the master and what device is the slave in your configuration? Can you provide a scope shot of the waveforms when this issue occurs?

    Maybe there is some noise or confusion on the bus that is causing this issue. When this issue occurs can you check the states of the I2C registers within CCS, maybe that will give some sort of hint. See the F2833x Technical Reference Guide's I2C section for information on the register bits.

    best,

    Kevin

  • Thank you  

    In my configuration, DSC TMS320F28335 is the master and Raspberry pi is the slave. 

    I have run a simple program to generate a squarewave on GPIO32, GPIO33, and GPIO11. These are the results. Probe 2((blue) is connected to GPIO33. Probe 3(pink) connected to GPIO32 and probe 4(green) is connected to GPIO11.

  • Hi Bhismadev,

    Bhismadev Meher said:
    I have run a simple program to generate a squarewave on GPIO32, GPIO33, and GPIO11.

    I'm a little confused by this, are you using the I2C module in this test, GPIO32 and 33? Are you able to get any I2C communication working before this issue occurs?

    If so you need to capture the waveform of the signals right when this issue begins. i.e. what occurs on the bus that could be causing the signals to hang low?

    Best,

    Kevin

  • Thank you  

    Actually, I want to state that I think particularly GPIO32 and 33 is damaged. At first, when I started doing I2C communication, for 2 days it was running ok. But after that, it did not even start the communication. Hence I can not give you waveforms for GPIO32 and 33 as SDA and SCL. Those are staying always at 1V and 500mV. That is why (I suppose) communication is not even starting. But other GPIO are working normally (as you can see from the waveform of GPIO11 from my previous post). I want to know is there any possibility that due to i2c communication those two GPIOs are damaged and if it is then what is the solution. Again I want to say that I am using 1 Kohm pull up resister and 3.33V pull up from raspberry pi.

    Thanking You

    Bhismadev Meher

  • Hi Bhismadev,

    Bhismadev Meher said:
    cularly GPIO32 and 33 is damaged. At first, when I started doing I2C communication, for 2 days it was running ok. But after that, it did not even start the communication.

    Have you changed anything in your hardware setup between the time it was working and not working? Have you provided ample grounding between the F28335 and Raspberry Pi?

    It's not clear to me if the I2C pins are damaged at this time. If you set GPIO32 and 33 to GPIOs and toggle them, does that work OK? Can you try testing the F28335 and Raspberry Pi I2Cs separately? I think for the F28335 master device you can check if the slave address is transmitted correctly when probing with an oscilloscope without being connected to a slave device, though it will NACK the address and stop the comms after.

    Bhismadev Meher said:
    Again I want to say that I am using 1 Kohm pull up resister and 3.33V pull up from raspberry pi.

    Is this an external pull-up resistor? Or internal to the Pi? If external, maybe a weaker pull-up (higher resistance) would be better. Also depending on the I2C frequency you're using.  2.5 to 5k resistors should be good.

    Best,

    Kevin

  • Hi Bhismadev,

    Any update on your end for this issue?

    Best,

    Kevin

  • Thank you  

    I hadn't changed anything in hardware. All I had changed was the pull-up resistor. I had connected both of the grounds of raspberry pi and DSP.

    Earlier mentioned pull-up resistors were external pull-up resistors. Now I am working with a new DSP  and 5k pull-up and is so far working fine. I am thinking that low pull-up resistors(1k that I used earlier) might have damaged internal pull-up and that is why it got damaged.

    About the GPIOs, everything is fine except it can not go to 3.3 V instead it is staying at 1V. Even the slave address is getting transmitted in that GPIO but with a square wave of 1V peak. Is there any possibility of getting damaged of internal pull-up due to high external current.

    Regards 

    Bhismadev Meher

  • Hi Bhismadev,

    Good to hear you got something working. 1k ohm resistors are kind of on the low side for I2C pull-up resistors. You can check out this TI App report on the topic of I2C pull-up resistors:

    https://www.ti.com/lit/an/slva689/slva689.pdf

    Bhismadev Meher said:
    About the GPIOs, everything is fine except it can not go to 3.3 V instead it is staying at 1V. Even the slave address is getting transmitted in that GPIO but with a square wave of 1V peak. Is there any possibility of getting damaged of internal pull-up due to high external current.

    Maybe they are damaged, but I wouldn't expect 1k ohm pull-up resistors to damage the pins. Maybe something else happened (ESD, etc). Did you try configuring the pins as normal GPIOs, not configuring for I2C, and toggling them?

    Best,

    Kevin