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.

在程序运行过程中,修改节点类型不成功

Other Parts Discussed in Thread: CC2530

如题 在程序运行过程中,使用osal_nv_write 将修改的数据(节点类型)写入NV区 然后用osal_nv_read读出结果,结果正常是我想写入的数据。此时证明写入成功。然后调用systemReset函数重启。

并且 ZCD_NV_STARTUP_OPTION  已经设置成 ZCD_STARTOPT_DEFAULT_NETWORK_STATE

问题:重启后节点类型不起作用,无法重建网络(节点类型由router改为coodinatore)

补充:已添加NV_INIT和NV_RESTORE宏,使用CC2530芯片

  • 你好!

      你可以在ZDApp.c文件里面有关于ZDOInitDevice函数的说明:

    NOTE:    If the application would like to force a "new" join, the
     *          application should set the ZCD_STARTOPT_DEFAULT_NETWORK_STATE
     *          bit in the ZCD_NV_STARTUP_OPTION NV item before calling
     *          this function. "new" join means to not restore the network
     *          state of the device. Use zgWriteStartupOptions() to set these
     *          options.

    你可以再研究下!谢谢!