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.

LAUNCHXL-CC1352P: CC1352P1: OpenThread temp_sensor example adding external sensor using I2C

Part Number: LAUNCHXL-CC1352P
Other Parts Discussed in Thread: SYSCONFIG

Hi,

I am studying the usage of OpenThread network. I am using as example the temp_sensor example available in the Resource Explorer for CC1352P-2 LaunchPad, but as I am using the LP CC1352P1, I am changing the antenna output power to 5 dBm. The temp_sensor application is connected to another LP running the cli_ftd example. When I run the examples I am able to connect them and everything works as expected.

Then I try to read an external sensor using the I2C interface. The following images show the changes I made in the temp_sensor code:

  • Add I2C_init() in main.c:

  • Changed tempsensor.c file to read I2C temperature value:

  • This is the read_ens210_temp() function:

For some reason when the temp_sensor app runs and joins the network provided by the cli_ftd app it looks like it's crashing after the I2C reading:

I can see that the temperature value changes and then it stops responding, I cannot get CoAP responses from the LP and it doesn't respond anything.

Do you have any suggestions on where there might be an error or something I can look up to find the causes?

Thank you.