Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

TMS320F28027F: TMS320 I2C slave kills SCL

Part Number: TMS320F28027F

Hi,

I'm trying to get a TMS570 HDK to talk to a TMS320 launchpad on I2C, where the 570 is the master. I have the master sending out dummy messages with the ignore NACK option set. The 320 is configured to be the slave, but when I set its own address to the correct value and start the I2C module, the 320 pulls the SCL line low, killing the communications.

If I set the wrong slave address the clock continues, as you would expect.

Why does it do this? All the other code on the 320 has been commented out, this is the only code running.

  • Hi Andy,

    Does this happen after the slave address is received on the I2C bus from the TMS570 device? If so, can you capture and provide screenshots of the SDA/SCL waveforms?

    Andy Worsley89 said:
    Why does it do this? All the other code on the 320 has been commented out, this is the only code running.

    Can you post your TMS320 I2C code here?

    Best,

    Kevin

  • I have something of a clue now. I slowed the transmission rate down to once per every 5 seconds, so that I could capture the SCL and SDA lines on the message that causes the hang (it had been every 10mS). When I did that I noticed that it wasn't the first message that hung it, but the fifth. So it looks like some kind of overflow. The messages aren't being handled yet, I just wanted to get to the point that the 320 was ACKing the message.

  • Hi Andy,

    OK, that's good to hear that you were able to make some debug progress. Looking at the value of the the I2CSTR status register before and after the issue may give some insight into what the issue is. There are bits that will be set when an under or overflow condition occurs.

    Please let me know if you need any additional support from me.

    Best,

    Kevin

  • Hi,

    I have some more clues. The incoming message generates an interrupt on AAS, the code then sets a flag to say there is an incoming message and it polls the RRDY flag to capture the data. It also polls the SCD bit (Stop condition) to signify that the message is ready to be processed. This works, but according to the TRM if the Stop condition is detected it should clear the AAS flag, but it isn't doing. As a result it captures one message then never interrupts again and a buffer overflow occurs, which hangs the I2C.

    I have tried writing a 1 to the AAS bit in the Status register (STR), but this has no effect either. How do I get this interrupt to clear?

  • Hi Andy,

    Sorry for the delay. Will continue the discussion in your new post:

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/871079/3223560#3223560

    Best,

    KEvin