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.

How to set port configuration for I2C of CC1310

Other Parts Discussed in Thread: CC1310, HDC1080, CC2650

Hi,

I have been in trouble with I2C on CC1310. I am using HDC1080 for humidity and temperature.

The report time 1 minute and there is no packet loss.

But there are some unexpected temperature and humidity measurements.

So, I am checking all things. 

How can I set port configuration for I2c?

As you know, clock and data for I2C are bidirectional. I am using the port configuration from TIDA00488_TIDA00758_firmware example project.

The following is the setting from your code:

Board_I2C_SDA | PIN_INPUT_EN | PIN_NOPULL | PIN_HYSTERESIS, /* I2C */
Board_I2C_SCL | PIN_INPUT_EN | PIN_NOPULL | PIN_HYSTERESIS, /* I2C */

but, on E2E some example provides the following configuration:

Board_I2C0_SCL0 | PIN_INPUT_EN | PIN_PULLDOWN, /* I2C clock */
Board_I2C0_SDA0 | PIN_INPUT_EN | PIN_PULLDOWN, /* I2C SDA */

Conclusively, there are some unexpected measurement from sensor.

I assume the sensor is working correctly.

Is there a possibility that I2C signal is deteriorated by port configuration?

I need your help urgently.

Thanks in advance.

Baeyoung

  • You can try to refer to sunmaysky.blogspot.tw/.../basic-example-to-use-hdc1080-on-cc2650.html . It's an example running on CC2650 but should work on CC1310 too.
  • Hi, YK Chen,
    Thanks for your update.
    I compared my code with your suggestion. there was no difference.
    Actually my code is working well except some unexpected measurement.
    I mean that
    1. for temperature
    the measurement should be 0x0111, but the measurement was 0x0131,
    the measurement should be 0x0112, but the measurement was 0x0102,
    2. for humidity
    the measurement should be 0x0211, but the measurement was 0x0231,
    the measurement should be 0x0213, but the measurement was 0x0233,

    I think there is some noise on I2C communication.
    The unexpected measurement was rare, about one per 300~400 measurements,
    So, I am asking about port configuration.
    There are pull-up resistors for SDA and SCL. Also, the serial resistors are used.
    Thanks in advance.
    Baeyoung
  • - How do you know what the reading should be?
    - How do you know that the error is on the I2C interface? (In other words you are not sending the data over the air?)
    - Is the sensor placed far from the CC1310, any reason it should be noise on the interface?
  • Hi TER,

    First of all, the following is the measurement from sensor,

  • Actually, I am talking about assumption.
    Based on the graph, I assume there was a measurement. But there was a peak.
    The first measurement is a temperature and the second is a relative humidity.
    When I compared the peak with the previous measurement, I assume a bit is deteriorated.
    The wireless sensor is sending the measurement every minute. and the sensor is not from CC1310.
    Do you have any recommendation for the placement?
    I have been spending a lot of time to solve this problem. It's more than two weeks.
    I am using two sensors, HDC1080 from TI and SHT25 from Sensirion.
    The curious thing is that HDC1080 and SHT25 shows very similar unexpected peak around 30.6 celsius degree.
    When I changed the port configuration, the relativity of unexpected peak was different.
    I need your help.
    Thanks in advance.
    Baeyoung
  • How do you get that peak? From I2C reading?
  • Have you tried to monitor the I2C interface with a scope or similar to see if you see the bit error?
  • Hi,
    Yes, I checked the I2C signals when I checked the integrity of hardware. The signal was good.
    As I said, the unexpected peak was very seldom.
    Now, I'm checking measurement. I will update tomorrow.
    Baeyoung
  • Hi,
    Up to today, I checked the I2C signal and found there was no error.
    Finally, there was no error on wireless node. There is a problem on Concentrator.
    My project is based on your wireless sensor network included in tirtos_cc13xx_cc26xx_2_20_00_06.
    I have a question for CRC.
    Is CRC used for easylink?
    When I checked rfc_CMD_PROP_TX and rfc_CMD_PROP_RX_ADV, it seems that CRC is used.
    By the way, there is a error for CRC, is the packet dropped by RF processor?
    I need your confirmation.
    If RF is correct, I will check my software on Concentrator.
    Thanks in advance.
    Baeyoung
  • The EasyLink layer does report CRC error, but in that version of TIRTOS the Wsn Concentrator does not handle the case of RX Error.
  • Hi,

    Thanks for update.

    Actually there was another problem. I2C is perfectly working.

    By the way, do you mean that if there is CRC error, easylink can't handle the error?

    But I assume that the error packet is dropped RF processor, Cortex-M0. Is it correct?

    Thanks for your help.

    Baeyoung