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.

RTOS/MSP432E401Y: Receive I2C signal on port even when debugger is halted

Part Number: MSP432E401Y
Other Parts Discussed in Thread: TMP116

Tool/software: TI-RTOS

Hello,

I am working on MSP432#401Y Launchpad. I have loaded i2c example program which reads the temperature from on board sensor.

The example code suppose to measure the temperature and display.

However, I observed that even when the program is halted at a specific break point and I try capturing the data on pins I2CMSP432E4_PN5_I2C2SCL and I2CMSP432E4_PN4_I2C2SDA.

It displays some data on the both the pins.

As per my understanding there should not be any data when its program is halted it could be at max either continue to be HIGH or LOW

Problem-1:

Should there be some data when debugger is halted?

Problem-2:

As I see the example code it calls the I2C_Transfer function for address and returns FALSE to enter in to while loop for ever. It seems to be the error where it is not able to resolve the sensor.

Any clue? why does it return false? Am I missing any config?

    if (!I2C_transfer(i2c, &i2cTransaction)) {
        /* Sensor error, Could not resolve a sensor, error */
        while(1);
    }

Question-1:

Also, I want to use I2C0 instead of I2C2 port used in example code.

Is that enough if I update the struct parameter in below struct for using I2C0 port or need to change some other code piece as well?

I could not trace any other place than the below struct where I2C port is been mentioned in example code

/* MSP_EXP432E401Y.c */
const I2CMSP432E4_HWAttrs i2cMSP432E4HWAttrs[MSP_EXP432E401Y_I2CCOUNT] = {
    {
#if 1		//This is what I want
        .baseAddr = I2C0_BASE,
        .intNum = INT_I2C0,
        .intPriority = (~0),
        .sclPin = I2CMSP432E4_PB2_I2C0SCL,
        .sdaPin = I2CMSP432E4_PB3_I2C0SDA,
        .masterCode = 0x08
#else		//Example code
        .baseAddr = I2C2_BASE,
        .intNum = INT_I2C2,
        .intPriority = (~0),
        .sclPin = I2CMSP432E4_PN5_I2C2SCL,
        .sdaPin = I2CMSP432E4_PN4_I2C2SDA,
        .masterCode = 0x08
#endif

    }
};

Thanks

/Hp

  • Hello Hetal,

    I will try this and get back on Thursday.

    Thanks,

    Sai

  • Hello Hetal,

    I ran the example ../example/rtos/MSP_EXP432E401Y/drivers/i2ctmp116 and the example ran as described in the Readme. I used the BOOSTXL_BASSENSORS boosterpack to talk to TMP116 sensor.

    Hetal Panara said:
    Should there be some data when debugger is halted?

    If I place a breakpoint inside the "for" loop then the I2C bus halts, as expected after one transcation. See screenshots of the code with breakpoint set and the associated screenshot of the I2C bus.

      

    Hetal Panara said:

    Also, I want to use I2C0 instead of I2C2 port used in example code.

    Is that enough if I update the struct parameter in below struct for using I2C0 port or need to change some other code piece as well?

    Please refer the following SimpleLink Academy Lab for complete steps: http://dev.ti.com/tirex/explore/node?node=AAy4.IsJ5ALEdHYC71z6BQ__J4.hfJy__LATEST

    Thanks,

    Sai

**Attention** This is a public forum