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.

compile nv-restore ,how to wipe off the information in flash when children remove

Other Parts Discussed in Thread: CC2530

Hi, i have a problem with the network of cc2530.i have compiled with NV-RESTORE including ZC,ZR,ZED. so the parents will write informations of his children,  such as short address, mac address,into flash part when ZED join the network. And the information  will be there even the children remove. so the capacity of parent will not restore even his children remove . my trouble is how to clean the information which is writen in the flash when the children removed in order to restore the capacity of parent.

  • Hello,

    What are you trying get accomplished?
    Do you have a mobile End Device?
    Why to want to remove a ZED child from a parent in your network?
    Have you thought about turning of NV_RESTORE?

    LPRF Rocks the World

  • Hi,

    On coordinator, you can use API NLME_LeaveReq() to ask ZR or ZED to leave its network. On ZR or ZED, you can use API ZDP_MgmtLeaveReq() to ask itself to leave network. If the leave request is successfully acknowledged, the ZC will clean up the information of related ZR or ZED on flash.

  • Hello,

    1. I want to organize a large mesh network with almost 600 endpoints . whatever happen to the network ,it will work normally. i.e. ZC reset or ZR reset or ZED reset ,or even change the ZC, ZR, the network will work normally.

    2.  no, I have no mobile End Devive, the devices  there are motionless.

    3. I don't want to remove a ZED child from a parent in my network, but when a parent reset or broke, his child may rejoin to other parents and because of nv-restore ,the information of child in original parent will not be cleaned. besides ,the information there will pervent other child to join to this parent  because the capacity can not decrease. so i do not want to remove the ZED, i want to remove the information if the child rejoin to other parent.

    4. if i turn off NV-RESTORE in my project, when the ZC reset , it  can not  join the network again .so i add NV-RESTORE to my coordinator

    5.what is  your advice  about  nv-restore in realitic project . the ZED was motionless,but ZED,ZC,ZR will reset .should i add in all them or just in ZC or just in ZC and  ZR

                         thank you very much

  • HI,

     Thank you for your answer, but how can the orijginal parent (ZR) clean up the information of  related ZED on flash automaticly when the related ZED rejoin to other parent .

     can i ask another question? what the different beweet resume and rejoin state in reslistic situation. should i add nv-restore to ZC,ZR,ZED in realistic project?

  • In real project, it is necessary to add NV_RESTORE to ZC, ZR, and ZED. Otherwise, reboot of anyone will cause problem of your mesh network. The mesh network is self healing so you do not need to worry about the NV data even if you turn off one ZR and the ZED under it joins another ZR or ZC.

  • Hi, YiKai  Chen

     Thank you for your reply.  but in real situation ,i should change ZED  when it  broke,so ishould clear up the nv data of  the broken ZED in parent  that  new ZED can join to the parent without lacking of capacity .for example ,the capacity of one router is 20 and there are 20 children associate to the parent. then two children removed because of broking ,so i should add two new children .but the new ZED can not join to the parent because the capacity is full even i restar the parent.  what about your suggestion?

  • Hi Leo,

    Using leavereq is the only method to make a ZR or ZED leave the network correctly and clean up the related NV flash. This is what I get from TI representative. In general, the capacity of one router is larger than 20. In my case, it can be 80. My suggestion is to reserve the capacity for broken ZED or ZR.

  • Hi YiKai Chen,

    In Zstack ,the default capacity of ZC or ZR is 20.if i change it ,such as 40,what items should i pay attention . in other words , what  conditions should my router meet if it want to enlarge its capacity to 40.  by the way,  are there any problems in your case when you enlarge capacity to 80.   thank  you .

  • There should be nothing need to pay attention. You can enlarge the number until you have a compiling error. There is not any problem in my case in which I enlarge the number to 80 in my coordinator and router.