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.

TMS570LS1224 I2C receive from interrupt

Other Parts Discussed in Thread: HALCOGEN

Hello,


I'm trying to receive data over I2C from interrupt. The I2C driver is configured with HalCoGen (Master Mode, 7bit Address, Transmitter, 8Bit data, Repeater mode) with enabled NACK, ARDYINT, ICRRDY, ICXRDY and SCDINT interrupts.

My receive operation is made up of following steps:

1. Send address(es) of register(s) to be read to slave

2. on SCDINT interrupt clear stop bit  and receive register data from slave (this is done immediately in notification of I2C)

I'm running now in trouble, if I don't wait for reset of MST bit before start receiving.

Is there any way to detect MST bit (maybe via interrupt), because I try to avoid an endless loop on interrupt  ( while(!i2cIsMasterReady(...) {;} )

Thanks and best regards,

Hannes

  • Hi Hannes,

     Please see below flowchart for handling the interrupt. The flowchart is part of TI DSP I2C module reference guide. There are other flowcharts in the document for different modes as well. The Hercules I2C shares the same IP with the TI DSP.  See .