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.

CC2652R7: Switching OFF and ON the radio

Part Number: CC2652R7
Other Parts Discussed in Thread: Z-STACK, SYSCONFIG

I am using the doorlock example. In the example, the device is sleepy end device where it transmits the lock status every 2 seconds. 

For my application, I need to process some data which may or may not last 2 seconds. So, I need to be able to control the sleeping of the radio. 

  1. Wakeup
  2. Connect to the network
  3. Send data
  4. Do the required processing
  5. Go to sleep for, say, 5 seconds.

I thought the best way to do this would be to configure the device to be always ON and explicitly put everything to sleep. I tried with the sleep() function assuming that it puts everything to sleep but looks like the radio stays on all the time.

How do I put the controller in Standby mode and wake it up after 5 seconds?

  • Hi Vivek,

    I recommend that you use the sleepy ZED configuration and set a timer to expire at the determined 5 seconds.  You would then set an event flag from the timer callback to be processed during the main application task loop.  Please refer to zclSampleDoorLock_initializeClocks, which uses UtilTimer_construct to set up a zclSampleDoorLock_processEndDeviceRejoinTimeoutCallback which sets SAMPLEAPP_END_DEVICE_REJOIN_EVT to be serviced during zclSampleDoorLock_process_loop.  Or further explain your application requirements if I am not fully understanding what you hope to achieve.

    Regards,
    Ryan

  • Hello Ryan

    We are using the TI-Open Thread stack and CoAP client on the doorlock for our application. Every few seconds, it should wake up, connect to the network, send it's data to the network controller, process the response from the controller and go back to sleep.

    The processing of the response from the controller may take different amounts of time depending on the response. Once the processing is done, I need to put the system to sleep to reduce power consumption.

    Also, I was looking at the power policy of the app. The policy defines the MCU to be put into standby. Will the standby mode get triggered if we call sleep?

  • Thanks for clarifying that you are using Thread and not Z-Stack.  The same concept applies in that a sleepy MTD end device doorlock will enter the low-power standby mode once the idle function is entered (i.e. when no task is running).  You can read more about this from the Application Development and Power sections of the TI OpenThread User's Guide.  After making the correct configuration selections inside of SysConfig, manually calling sleep should not be required.

    Regards,
    Ryan