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.

TMS320F28379D: I2C interrupts

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Is it possible to use the I2C interrupt and I2C-FIFO interrupt together?

If so, is there an example?

Thanks,

Dhammika

  • Dhammika,

    I2C interrupt and I2C FIFO interrupt can be triggered by following I2C events. From EPIE interrupt, both I2C interrupt and I2C FIFO interrupt are independent of eachother and can be used together.

    I2C example codes we provide in C2000Ware use only I2C FIFO interrupt and not I2C interrupt. I2C interrupt can be triggered by multiple events, on which event do you have to trigger I2C interrupt? Please clarify?

    Regards,

    Manoj

  • Hi Manoj,

    I want to do the following.

    1. Set MASTER_SEND_MODE
    2. Send “Start”
    3. Set the number of bytes to transfer.
    4. Send the EEPROM address (2 bytes).
    5. Send the data bytes
    6. Wait till the FIFO empty interrupt is received.
    7. Once the interrupt is received, send “Stop”
    8. Wait till the Stop Condition Detected (SCD) interrupt occurs.
    9. Once the SCD interrupt occurs, indicate that the bus is inactive.

     That is just for writing data to a serial EEPROM. I am not using Free Data Format. Step no. 8 never happens (i.e. I2C interrupt did not occur).

    My final aim is to send more data after the FIFO empty interrupt is received and then send the “Stop”.  But I could not go that far. Do you have an example that can do the above?

    Thanks,

    Dhammika

  • Dhammika,

    I'm held up with an important project deadline. I will get back with you in couple of business days.

    Regards,

    Manoj

  • Hi Manoj,

    Not a problem.

    Regards,

    Dhammika

  • Dhammika,

    Have you made any progress in your debug on this topic?

    Regards,

    Manoj

  • Hi Manoj,

    I was waiting for some advice from you. I have tried all kinds of things to get this to work. The only methods that remain are, 1) use free format data, 2) use the I2C interrupt and specify the number of bytes again when the second set of data bytes are required to be sent. I have not tried those though.

    Thanks,

    Dhammika.

  • Hi Manoj,

    I managed to write more then 16 bytes of data without sending the EEPROM address multiple times. I used the I2C interrupt and did not use the FIFO interrupt. This is enough for my purposes. I used the I2C_REPEAT_MODE for writing data. 

    Reading is not a major issue since EEPROM always remember the last address read and we do not have to send the address again (unless we want to access a completely different area of the EEPROM). I do not want to publish the code since it is a bit ugly at this point. 

    Thanks,

    Dhammika