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.

CCS/CC2652R: Thread otLinkSetPollPeriod issue with SED

Part Number: CC2652R


Tool/software: Code Composer Studio

Hi

I am implementing a SED and would like to have communication period around every 15 min. In order to achieve best power saving I would like to increase polling period of the SED. I use SDK 3.40.

I do the following:

otLinkModeConfig aConfig;
aConfig.mRxOnWhenIdle = false;
aConfig.mDeviceType = false;
aConfig.mNetworkData = true;
aConfig.mSecureDataRequests = true;

OtRtosApi_lock();
otThreadSetLinkMode(OtInstance_get(), aConfig);
otThreadSetChildTimeout(OtInstance_get(), 5*60); // 5 min
OtRtosApi_unlock();

//initiate connection to mqttsn gateway
OtRtosApi_lock();
otLinkSetPollPeriod(OtInstance_get(), 500);
OtRtosApi_unlock();

// when connection is established change polling timeout
OtRtosApi_lock();
otLinkSetPollPeriod(OtInstance_get(), 10000);  // << this timeout always works
//otLinkSetPollPeriod(OtInstance_get(), 20000);  // << this timeout never works
//otLinkSetPollPeriod(OtInstance_get(), 30000);  // << this timeout never works
//otLinkSetPollPeriod(OtInstance_get(), 60000);  // << this timeout never works
OtRtosApi_unlock();

while(true)
{
  //do publishing data
  ...
  OtRtosApi_lock();
  otLinkSendDataRequest(OtInstance_get());
  OtRtosApi_unlock();

  // sleep here for xxx seconds
}
 

When I use poll timeout 10 sec then everything works as expected. When I use e.g. 20 or 30 or more seconds - strange things are happening. Seems like device goes into some loop, power consumption is sky high and nothing happens on radio side.

See attached wireshark log. 

Capture.pcapng.gz

  • Hi,

    Is the device responsive at all (e.g. to GPIO interrupts, etc)?

    Can you try debugging to see where in the code the device could be hanging?

    Regards,
    Toby

  • It seems that device is responsive. See the images attached. If I set a brakepoint in OtStack_task there comes some events (OtStack_procQueueCmd_alarm, OtStack_procQueueCmd_tasklets, etc) but not very often - so this task is not looping. The same with tempsensor_task and datahandler task - they are alive but not looping. It seems that the main core is in deep sleep.

    Thus - can it be that network processor is looping consuming the power?

    UPDATE: I've just tested on Launchpad with the same code - everything works fine. The difference between my custom board and lauchpad is that instead of 22uF caps on VDDS and VDDR I put only 10uF caps (those I had to hand). So, now I added 1 more 10uF cap to VDDS and two 10uF more to VDDR and the stability seems to be better - but not perfect - after 6 successful transmits (around after 30 mins) communication stops - no data requests anymore, but the current consumption is not high anymore (around 50uA avg.).... Is this a hard minimum requirement to have at least 22uF caps? Why would it be influenced by poll period?

  • In general I recommend following the design of the launchpad. The datasheet also mentions using 22uF cap on VDDR, etc.

    I tried your configuration on the temp_sensor (using poll rate of 20 seconds), but leaving out the call otLinkSendDataRequest. It works fine after an hour.
    How long are you sleeping in each loop?