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.

TMS570LC4357: I2C Infinite loop

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN, CC3235S

Hello everone,

I'm having some issues with I2C communication and TMS570LC43x.

I did try all examples from HALCoGen, and I saw many related topics over the forum.

I want to communicate TMS570LC43x with TI CC3235S through I2C.

To test I2C i created a fresh new project.

- I2C HALCoGen drivers enabled

- PINMUX for I2C1 and I2C2 selected

- I2C interrupts

and I2C configuration:

Added pullup resistors to SCL/SDA lines, oscilloscope and logic analyser connected to communication lines:

I tried examples example_i2cCommunication, example_i2cInterrupt_Communication, example_i2cMaster_TX_RX and example_i2cSlave_TX_RX.

But it aways get stuck in infinite loop:

/*SAFETYMCUSW 28 D MR:NA <APPROVED> "Potentially infinite loop found - Hardware Status check for execution sequence" */
            while ((i2c->STR & (uint32)I2C_TX_INT) == 0U)

Can anyone give me some hints? What Im doing wrong.

  • Hello,

    Does CC3235S run in I2C slave mode? I noticed that the I2C pins are multiplexed with other functionality (UART, GIO, SDC, etc), is the pinmux configured correctly for I2C pins?

    As I2C master, TMS570 needs to know the communication protocol implemented in CC3235S.

  • Hi QJ,

    In this configuration TMS570 should be the slave, and respond to CC3235S requests.

    I tested CC3235S I2c with another MCU and it works.

    With TMS570 I have trouble.  PINMUX seems to be fine:

  • I am sorry for my unclear message. I mean the pinmux configuration on CC3235S device. 

    If you use TMS570 as I2C slave, please try this example: example_i2cSlave_TX_RX.c

    This example contains a sample I2C Slave Transmit and receive functionality. This example can be used to talk to any I2C Master which must use address 0x8 as slave address and Baud rate as configured in the HALCoGen GUI which is by default 100KHz

  • Hi QJ,

    Master baudrate is 100KHz.

    Requesting 10 bytes from slave (0x08)

    From slave side, running example_i2cSlave_TX_RX.c (addr 0x08 / 100KHz)

    slave gets stuck at:

    /*SAFETYMCUSW 28 D MR:NA <APPROVED> "Potentially infinite loop found - Hardware Status check for execution sequence" */
                while ((i2c->STR & (uint32)I2C_RX_INT) == 0U)

    I did also run an Master I2C 7-bit addresses scanner, and I cannot find TMS570

  • Hi QJ,

    So, I was connecting the I2C bus to wrong pins....
    The quickstart show some information, the datasheet shows another thing. Also the silkscreen on the PCB is wrong, its written HET_19, where I think it should be HET1_9. Anyway, now its working properly.