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.

Z-Stack HA 1.2.1 开关示例和灯示例程序,开关示例修改为2个端点,使能NV_RESTORE无法保存第二个端点的绑定信息



为了说明问题,做了如下实验:

1、协调器为开关示例,使用了2个端点EP8和EP9  ,终端(灯)使用了xHOLD_AUTO_START,在BindWriteNV函数中设置了一个断点,用于调试

2、首先 协调器启动,然后2个终端启动,一开始终端处于扫描状态,等到协调器建立好网络后,终端开始入网。

3、入网成功后,协调器调用了BindWriteNV函数,保存了网络数据,此时BindingTable为空,因为还没做绑定

4、继续运行一段时间,暂停查看绑定表,依旧为空,确认不会自动绑定

5、协调器按下SW2,进入EZ-Mode模式,等待配对。终端1也按下SW2,开始配对,等待1-2秒后,协调器LCD显示EZ-ModeSuccess。同时进入BindWriteNV函数。此时绑定表中第0个位置已经出现这个配对点信息。说明肯定能够保存这一次的配对信息。

6、继续运行。按下协调器的SW2,再次进入EZ-Mode,同时按下终端2的SW2,进行配对,然后显示配对成功,Success, 但是没有进入BindWriteNV函数,导致没有保存第二次的绑定信息。协调器重新上电后,只能恢复第一个绑定。


为了证明使用BindWriteNV函数能够保存网络信息,在按键4中添加了手动调用该函数的语句,实验后确认能够保存成功,重启后绑定表恢复。


麻烦技术人员根据这个情况帮忙实验是否是这样,为何会这样? 由于无法跟踪到哪里调用了BindWriteNV()函数,所以暂时卡在这里了。

附件是开关部分相关程序工程

灯部分只是使用了   xHOLD_AUTO_START。


SampleSwitch.rar
  • 向你请教个问题,我装的也是 1.2.1,但是里面的 demo 用 IAR8.30打开编译会有各种的问题,

    Error[e104]: Failed to fit all segments into specified ranges. Problem discovered in
    segment XDATA_N. Unable to place 2 block(s) (0xc02 byte(s) total) in 0x1d7 byte(s) of
    memory. The problem occurred while processing the segment placement command
    "-P(XDATA)XDATA_N=_XDATA_START-_XDATA_END", where at the moment of
    placement the available memory ranges were "XDATA:1d29-1eff"
    Error while running Linker

    或者 

    Error[e16]: Segment XDATA_I (size: 0x3a5 align: 0) is too long for segment definition. At least  
    0x93 more bytes needed. The problem occurred while processing the segment placement  
    command "-Z(XDATA)XDATA_N,XDATA_Z,

    XDATA_I=_XDATA_START-_XDATA_END",  
    where at the moment of placement the available memory ranges were "XDATA:fbee-feff" 
       Reserved ranges relevant to this placement: 
       XDATA:e000-e007      XDATA_AN 
       XDATA:e008-e307      XSTACK 
       XDATA:e308-feff      XDATA_Z 
       BIT:0-7              BREG 
       BIT:80-97            SFR_AN 
       BIT:a0-af            SFR_AN 
       BIT:b8-c7            SFR_AN 
       BIT:d8-df            SFR_AN 
       BIT:e8-ef            SFR_AN

    请问你是否有遇到,如何解决的??
    非常感谢。。。
  • 版本低,下载最新IAR