This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can I disable OpenThread polling for nrf5 temperature every 30 seconds?

Hello,

I'm using the OpenThread from v4.0.0 of the Thread/Zigbee library and the TEMP driver to read nRF52840 temperature via a nrfx_temp_data_handler_t. I noticed the handler is being triggered every 30 seconds in addition to when I trigger a reading myself via nrfx_temp_measure() via a timer. I think I tracked this down to the OpenThread library doing a temperature reading every 30s.

Is there a way to disable OpenThread from triggering a read every 30s or should I just do some additional book keeping to read at the interval I desire?

Thanks,

Jeremy

  • Hello,

    The temperature value is used to compensate it's influence on measured RSSI. 

    https://github.com/NordicSemiconductor/nRF-IEEE-802.15.4-radio-driver/blob/4b9d0d4ebca14b2ea1c430c01989abed715bcea5/src/nrf_802154_rssi.c#L41

    You see that depending on the temperature the RSSI value can be shifted by the offset in range -3 to +3 dBm, depending on the temperature. 

    This value impacts: 

    -RSSI

    -LQI

    -ED

    -CCA_ED

    In case we were not compensating for the RSSI changes, or react very slowly, we could see two issues:

    - Impacted routing (so the frame would take a different path than it should, or even a node could be considered out of range, due to inaccurate RSSI measurements).

    - impacted frame sending as the Energy Threshold could not be exceeded - so at the edge of range the connection would be even less reliable.

    These examples are exaggerated, but could happen - especially important in environments in which the temperature changes radically, e.g. lighting solutions. 

    If the environment is stable it should be safe to increase the TEMP_MEASUREMENT_INTERVAL, or not to compensate it at all. 

    You could for example take 0 as the compensation offset. In worst case the RSSI would be 3 off. Please note that the above scenarios are from a theoretial analyzis. We did not perform any testing with the temperature measurements turned off.

    --------------

    This was the answer from our Thread team.

    It has been a while since you originally had this question, and I don't know if you have managed to find some workaround from the issues that you had with the interrupts. I still mean that your application should be able to handle interrupts, but if you want to turn off the temperature measurements, you need to rebuild the openthread stack.

    Remember to use the same tag that is used in the SDK that you are using. The tag is noted in the file:

    SDK\external\openthread\project\readme.txt.

    Best regards,

    Edvin

  • Hi,

    Thanks for the detailed explanation, I appreciate these details. This all makes sense.

    I did do as you suggested and added some tracking to determine when I triggered a reading so I can ignore the OpenThread triggered interrupts.

    Jeremy

Related