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.

CC2652R: I2c temperature and humidity sensor issues

Part Number: CC2652R
Other Parts Discussed in Thread: Z-STACK

Hi,

I've my custom design using the CC2652 microcontroller, I've integrated sensors with different protocols and it works fine, I've created timers for reading an i2c humidity and temperature sensor, activating the timer when the sensor enters the zigbee network, the sensor read and the data is sent to the coordinator, the implementation is done as follows

The sensor reads fine for some time, until it doesn't take a good reading and the cc2652 locks up or stops communicating with the i2c sensor, the i2c.transaction error code is 9 correspondig to the i2c bus is busy, this always It happens at different times, I would like to know if there is any code  solution to solve this i2c problem or if there is any error in my code implementation.

I use de SDK 4.3 version and the code is based in cc26x2r1 simplelight end device implementation.

Regards,

Jose.

  • Hi Jose,

    I do not see anything from the Z-Stack code which suggests an issue.  Are you able to recreate this using a modified i2ctmp example?  Please note that you should not have to open/close the I2C instance on each iteration of readHyt.  You can also try to use I2C_cancel to issue a stop condition on the bus.  Do you have a logic analyzer and can thus monitor I2C line activity?  The slave device may be holding down the clock line for some reason.  Please review your hardware design accordingly.

    Regards,
    Ryan