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

nRF52833 and Openthred timer callback and update issue

Using windows 10 OS, and SES v5.40.

I am using nRF52833 device in my project along with nRF5_SDK_for_Thread_and Zigbee_v4.1.0_32ce5f8 SDK. 

The timer is called for every 60s for customer specific application (the device wakes up every 60s  and updates the data and goes to sleep again) .

time_to_next_wake_up_U32 holds 60000 (60s)

TIMEAPP_StartSingleShotTimerWithCallback(TIMEAPI_CSA_CYCLIC_WAKEUP_e, time_to_next_wake_up_U32, CSA_CyclicTimerCallback, (void *)NULL);

Also, for open thread to start communication it is in while loop,i have used below line

error = otLinkSetPollPeriod(COMWIRELESS_ot_instance, 30000);     //30s
ASSERT(error == OT_ERROR_NONE);

otThreadSetChildTimeout(COMWIRELESS_ot_instance, 300);

Problem : the data that is updated takes 30s to update to communication stack (since the wake up time is 30). are there ways to update immediately.

From one of the links https://openthread.io/reference/group/api-link-link is got to know that poll period cannot be zero, it has to be atleast 10ms to consider the poll period.

I just want to do is indefinitely, whenever there is data updated it should be updated to communication stack immediately. 

Parents
  • After discussing internally:

    You don't mention about the communication protocol the application is using, but we imagine there is some bidirectional traffic involved. With a poll period of 30 s it might happen that the complete application transaction takes that amount of time. The solution could be that the application reduces the poll period whenever it has data to deliver to something like 100-500 ms, and then go back to the energy saving mode of 30 s.

    Hope that helps,
    Kenneth

  • We are using thread protocol for communication and polling for around 100 -500ms helps to solve this issue.

    But the case is we are trying to build a product that goes to sleep once it is done with its tasks to save power consumption and if we poll for that duration i guess radio will be awake always.

    the solution for this worked is to use some notify function in OT platform so that it only wakes up whenever there is a change that is observed and goes back to sleep. 

Reply
  • We are using thread protocol for communication and polling for around 100 -500ms helps to solve this issue.

    But the case is we are trying to build a product that goes to sleep once it is done with its tasks to save power consumption and if we poll for that duration i guess radio will be awake always.

    the solution for this worked is to use some notify function in OT platform so that it only wakes up whenever there is a change that is observed and goes back to sleep. 

Children
No Data
Related