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.

TMS320F28386S: I2C Interrupt TXFF and ex3_external_loopback

Part Number: TMS320F28386S

Tool/software:

Hi there,

I'm getting started with the I2C peripheral, and I read the User Guide available at: "https://www.ti.com/product/TMS320F28388D". The guide specifies that the Receive and Transmit interrupts in FIFO mode will trigger according to the number of data bytes received or transmitted, respectively. However, I tried the "i2c_ex3_external_loopback" example, and the example doesn't send any data in the main loop, but the TX interrupt is triggered anyway.

I tried to analyze it with a scope, and there is no data on the bus. After I commented out the "I2C_putData" and "I2C_sendStartCondition" functions to verify if it was something related to the initial configuration, the interrupt kept triggering. Am I doing something wrong? Can someone check this for me?

All the examples in the SDK are using FIFO mode, and the details on how FIFO operations work aren't clear in the user guide. The guide only explains the normal operation, which isn't present in the examples. Is there any other document I can consult to better understand this peripheral?

Thank you for your guidance.

Best regards,

  • Hi Ramon,

    Can you confirm that all three connections for SDA, SCL, and LED matches the configuration in the example. You can refer to the comments on the top of the example for more details. This example requires no modification to software in order to run it successfully. 

    Here is a SW guide on I2C and I'd also recommend looking at past E2Es for more information: I2C Module — F2838x API Guide. I would still recommend running all the software examples to understand the peripheral better.

    Best Regards,

    Aishwarya

  • Hi Aishwarya,

    Thank you. It seems that the User Guide states the following (33.4.2 I2C FIFO Interrupts):

    "The transmit FIFO can be configured to generate an interrupt after transmitting a defined number of bytes, up to 16."

    However, the API states:

    "The transmit FIFO interrupt flag will be set when the FIFO reaches a value less than or equal to txLevel."

    This is a bit confusing, so while the API seems correct, I suggest updating the text in the User Guide to avoid any misunderstandings when reading it.

    Thank you for your guidance.

    Best regards,
    Ramon

  • Ramon,

    Thanks for the feedback, I will look into making this update. Please also continue to refer to the register descriptions which will always have the most detailed explanations of how to use these registers and should be clearer.

    I will go ahead and close this thread, if there are no more questions.

    Best Regards,

    Aishwarya