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.

put End-device in sleep mode

Other Parts Discussed in Thread: CC2538, Z-STACK

Hello All,

i am using zstack HA 1.20 and cc2538 SoC. one CC2538 as ZC and one CC2538 as ZED

I want to implement something like this -

1) my ZC & ZED should join the n/w and start communication. once the n/w joining is completed my enddevice must go in power down or sleep mode .

2) i know the ZED is transceiver -> means it can send data to ZC and receive data from ZC

3) so what i want is that in sleep mode/or power down mode transmitter of ZED should not be active only Receiver part should be active so that it should not send data unnecessarily to ZC and drain the ZED battery

4) instead of that if i send any command from ZC  to ZED the reciver part of ZED should receive it properly and only when any external interrupt or software interrupt occur then only ZED transmitter should become active and send data to ZC.

5) in short i want ZED transmitter to be inactive in sleep mode but ZED receiver should be active and if any interrupt/event  generated then only ZED transmitter become active.  

 

i hope i explained my problem..

anyone who has any idea how to achieve this plz help me...

plz reply....

Thanks & Regards,

Maneesh singh

  • ZED is natively designed for this. You can set POLL_RATE according to your application request.

  • Hello YiKai Chen Sir,

    thanks for reply

    As u suggested i checked the f8wConfig.cfg file for  POLL_RATE and it was said that -

    -DPOLL_RATE=1000

    /* The number of milliseconds to wait between data request polls to the coordinator. */

    but will you plz explain me how this will solve my problem... ->

    1) how my ZED can go in sleep mode and inactive its transmitter but remain active its receiver part?

    2) and how this POLL_RATE will work for me or what it will do ? becoz in my understanding it is used to poll the ZC  for data so how it will help in my requirement ? i

    3) is it like once it will poll the ZC it will keep ZED  Transmitter in sleep mode till the next poll duration but reciver of ZED will remain active ? or how it works?

    plz explain me sir..

    Thanks & Regards,

    Maneesh singh

  • When there is a message sent to ZED, it would stay on the queue of its parent node and wait for ZED to polling it. ZED do the polling and its parent will notify if there is  message for it. If yes, ZED will polling for it. If not, ZED would be back to sleep.

  • Hello YiKai Chen sir,

    Thanks for your reply..

    whatever u said understood but still i hav some doubt..............

    1) i dont want to keep my whole cc2538 SoC in power down mode i just want to keep my zigbee radio Transmitter and Receiver peripheral only in power down /sleep mode.... how can i achieve this ?

    2 ) Scenario 1) ZC <----------------------> ZED (here my ZED is sending data)

                    now ZED will send data request to ZC,

                           ZC will send ACK  &

                           ZED will transfer its data to ZC

    (Now after data transfer i want radio transmitter of ZED to go in sleep mode but its receiver should remain ON to receive any command or data from ZC ). 

    Scenario 2) in the above scenario if i want to keep my transmitter and receiver peripheral of ZED in sleep mode then how i can do this ? NOTE :- but if my ZC sends any cmd /data to ZED then ZED receiver should be able to receive it without fail... how can i achieve this ?

    3) actually my ZC is sending some control signal to my ZED at any random interval and my ZED is also sending some data/cmd to ZC at random interval....but i want power saving in between the communication but without missing any data send by either devices......

    4) plz tell me how i can control power management of ZED device radio ? means how i can keep its transmitter in the power down mode keeping receiver in the Active state and vise versa..........

    Yikai chen sir plz help me to solve this problem.....

    Thanks & Regards,

    Maneesh singh

  • 1. If you don't want CC2538 enter sleep mode, you don't use POWER_SAVING define and it won't enter sleep mode. However, this will consume more power is end device.

    2. You can't control TX/RX on and off by yourself in Z-ZStack. It is controlled by Z-ZStack and you can control POLL_RATE only.

    3. & 4. It is the same that you can use different polling rate to serve your application.

  • hello sir,

    in point no. 2 u said ->  " You can control TX/RX on and off by yourself in Z-ZStack. It is controlled by Z-ZStack and you can control POLL_RATE only.  " 

    what this mean---->  i can control  zigbee TX/RX ON/OFF or not? if yes then how ? which API or function i need to use ?

    and from the few doc i understood few points plz correct me if i am wrong ->

    1) No power saving mode or sleep mode for ZC or ZR... all the power management setting is done for ZED..am i right ?

    2) and POLL_RATE Parameter defines how often the node will wake up from sleep and send a data request to the parent device to poll for queued messages.....am i right? but here is a problem--->in between the POLLING ... ZED go in sleep means what ? if ZED is in a sleep mode means Zigbee Radio TX is inactive or RX is Inactive or Both is active ?

    3) if suppose my ZED goes in sleep mode and if my ZC send any data to ZED ......then is my ZED able to receive that data or not ? becoz currently my ZED is in sleep mode ?

    for ex --> if my ZED goes in sleep for 2 sec i.e 2000 milisec now if in between the sleep say at 800 millisec my ZC sends any cmd / data to my ZED then is my ZED is able to receive it or not ? ....if it is able to receive it then i am ok but if not then how i can Keep  RX of my ZED always ON and TX in sleep mode........

    4) in sleep mode my SoC is in which power mode ? PM0 or PM1 or PM2 or PM3 ?

    5) and in sleep mode only Zigbee radio is going into sleep mode or whole CPU and its peripheral is going in sleep mode ?

    6) is this possible to keep only zigbee radio in sleep mode keeping rest of the peripheral ,CPU  and devices in active mode so that i can perform some other sensor data scanning or other work while my zigbee radio is in sleep mode ?

    if possible plz answer my above listed question in detail sir....

    plz reply sir.... 

    Thanks & Regards,

    Maneesh

  • Hello YiKai Chen Sir,

    Plz Reply sir...

    Thanks & Regards,

    Maneesh singh

  • Hello sir,

    in f8wConfig.cfg file it is given that =>

    DRFD_RCVC_ALWAYS_ON=FALSE   <====  what does this means ?  what this macro do ?

     

    Thanks & Regards,

    Maneesh singh

  • It is a typo. I mean you can't control TX/RX on and off by yourself in Z-ZStack. It is controlled by Z-ZStack and you can control POLL_RATE only. RFD_RCVC_ALWAYS_ON=TRUE will make the RX always turned-on on end device so ZED won't have to do polling. However, it will consume lots of power.

  • Hello Yikai Sir

    thank for replying..

    but u didnt answer my following question..... its my request to you plz reply for following points of my previous post especially point no. 3 and  6->

     3) if suppose my ZED goes in sleep mode and if my ZC send any data to ZED ......then is my ZED able to receive that data or not ? becoz currently my ZED is in sleep mode ?

    for ex --> if my ZED goes in sleep for 2 sec i.e 2000 milisec now if in between the sleep say at 800 millisec my ZC sends any cmd / data to my ZED then is my ZED is able to receive it or not ? ....if it is able to receive it then i am ok but if not then how i can Keep  RX of my ZED always ON and TX in sleep mode........

    4) in sleep mode my SoC is in which power mode ? PM0 or PM1 or PM2 or PM3 ?

    5) and in sleep mode only Zigbee radio is going into sleep mode or whole CPU and its peripheral is going in sleep mode ?

    6) is this possible to keep only zigbee radio in sleep mode keeping rest of the peripheral ,CPU  and devices in active mode so that i can perform some other sensor data scanning or other work while my zigbee radio is in sleep mode ?

    Thanks & Regards,

    Maneesh singh

  • 1) No power saving mode or sleep mode for ZC or ZR... all the power management setting is done for ZED..am i right ? Yes, it only for ZED.

    2) and POLL_RATE Parameter defines how often the node will wake up from sleep and send a data request to the parent device to poll for queued messages.....am i right? but here is a problem--->in between the POLLING ... ZED go in sleep means what ? if ZED is in a sleep mode means Zigbee Radio TX is inactive or RX is Inactive or Both is active ? You are correct about POLL_RATE. When ZED goes sleep mode, both TX and RX are turned off and CPU goes to PM2.

    3) if suppose my ZED goes in sleep mode and if my ZC send any data to ZED ......then is my ZED able to receive that data or not ? becoz currently my ZED is in sleep mode ?I had explain to you many times that message would be stored on the queue of ZED's parent node and wait for polling.

    for ex --> if my ZED goes in sleep for 2 sec i.e 2000 milisec now if in between the sleep say at 800 millisec my ZC sends any cmd / data to my ZED then is my ZED is able to receive it or not ? ....if it is able to receive it then i am ok but if not then how i can Keep  RX of my ZED always ON and TX in sleep mode...…..Sure ZED will receive it after 2000 ms because it will do polling.

    4) in sleep mode my SoC is in which power mode ? PM0 or PM1 or PM2 or PM3 ?PM2

    5) and in sleep mode only Zigbee radio is going into sleep mode or whole CPU and its peripheral is going in sleep mode ?All are going to sleeping mode.

    6) is this possible to keep only zigbee radio in sleep mode keeping rest of the peripheral ,CPU  and devices in active mode so that i can perform some other sensor data scanning or other work while my zigbee radio is in sleep mode ?I have answered you in previous post. You can disable POWER_SAVING to turn off TX/RX and leave CPU wake.

  • Hello YiKai sir,

    Thanks for your reply now most of my doubt's got clear....thanks a lot..

    but i hav 2 query ->

    1) if i want to go in PM3 then what i should do ? i  read in some thread/ post and they were saying that by making POLL_RATE = 0 we can enter in PM3 i.e once ZED do the polling it will go in deep sleep mode and until any GPIO give interrupt it will not comes out of PM3..and again after polling for msg it will again go in PM3..... am i right sir ?

    2) u said that - > You can disable POWER_SAVING to turn off TX/RX and leave CPU wake.  ......that's correct if  i will not enable POWER_SAVING flag then my CPU will not go in sleep mode....

    but in that case when POWER_SAVING is disabled between the poll requests ZED device will go in sleep mode or not ? 

    3)  isn't there any way to keep individual peripheral of SoC in sleep mode ?

    for ex. if i dont want cc2538 Tx/RX radio to be active then i should be able to inactivate it but keeping rest of my peripheral active....similarly if i dont want USB or UART or I2C  to be active then individually i should be able to activate and deactivate the peripheral for power saving.....is this possible in cc2538 SoC ? and in zigbee? or not ?

    Thanks & Regards,

    Maneesh singh

  • 1. As I know, Z-Stack doesn't use CC2538 PM3. CC2538 PM3 can only be waken up by external GPI but Z-Stack have to use timer event.

    2. If you disable POWER_SAVING, it won't enter sleep mode between polling.

    3. No, CPU has to wake up when you want to use these peripherals.