微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI Zigbee设计交流 > 如何清除掉NV_RESTORE和NV_INIT后保存在NV中的所有信息

如何清除掉NV_RESTORE和NV_INIT后保存在NV中的所有信息

时间:10-02 整理:3721RD 点击:

加了NV_RESTORE和NV_INIT,设备可以保存已经连接好的网络信息,但是想让设备连接到另外一个协调器,用ztool工具修改了相应的NV中的PAN ID值,还是不能连接到新的协调器上。试过了用flash programmer清除掉flash中的所有内容是可以达到这个目的的,但是想在协议栈代码中通过软件方式实现,是否有函数可以调用或是需要做哪些设置呢?

If application wants to delete the stored NV information It just needs to set the ZCD_NV_STARTUP_OPTION as explained below and do a reset. 

"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 

[zgWriteStartupOptions(ZG_STARTUP_SET, ZCD_STARTOPT_DEFAULT_NETWORK_STATE);]

zGlobals.c中有这个函数

uint8 zgWriteStartupOptions( uint8 action, uint8 bitOptions )  //修改ZCD_NV_STARTUP_OPTION的值

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top