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.

CC2630: ZED doesn't restart after Leave Request from COO

Part Number: CC2630
Other Parts Discussed in Thread: Z-STACK, CC2650

Hi,

When the COO sends a LeaveRequest to my ZED I dont Receive a Indication nor a Confirmation, even though I registered for both Callbacks:

zstack_devZDOCBReq_t zdoCBReq = {0};

// Register for Callbacks, turn on:
// Device State Change,
// ZDO Match Descriptor Response,
zdoCBReq.has_devStateChange = true;
zdoCBReq.devStateChange = true;
zdoCBReq.has_joinCnfCB = true;
zdoCBReq.joinCnfCB = true;
zdoCBReq.has_leaveIndCB = true;
zdoCBReq.leaveIndCB = true;
zdoCBReq.has_leaveCnfCB = true;
zdoCBReq.leaveCnfCB = true;

(void)Zstackapi_DevZDOCBReq(ztsEntity, &zdoCBReq);

Besides that the ZED isn't restarting after it sends a LeaveResponse and still answers to a Node Descriptor Request from the COO. I attached the logs of the process. The Data Requests are triggered manually by the application as done with the workaround from Ticket 

LeaveRequest.zip

  • Hi Philipp,

    The application can expect to receive a leave indication via a Z-Stack message.

    For example, in SampleSwitch, the application uses Switch_processZStackMsgs to handle the Z-Stack messages.

    You can handle the leave indication in the zstackmsg_CmdIDs_ZDO_LEAVE_IND case. From there, you can use Zstackapi_sysResetReq for a reset.


    Regards,
    Toby
  • Hi Toby,

    I know I already did that:

    case zstackmsg_CmdIDs_ZDO_LEAVE_IND:
    {
    MSTI_setPollRate(0);
    PIN_setOutputValue(PinAttRepInt_handle, Board_Int2,1);
    Task_sleep(1000);
    PIN_setOutputValue(PinAttRepInt_handle, Board_Int2,0);
    }
    break;

    I set a GPIO I use for Debugging but nothing happens and when I use the debugger it's clear that the ICall never registers a incoming Z-Stack message. 

    Besides that shouldnt the ZDO_LeaveInd() trigger a reset when the incoming leave request has rejoin set to false. It looks to me that it should call ZDApp_LeaveReset().

    Regards Philipp

  • Notice that the extended address on the leave request does not match the extended address of the CC2650.

    Please check whether the COO is populating this field with the CC2650's extended address.
  • Yes you were right! With the correct address I now receive a zstackmsg_CmdIDs_ZDO_LEAVE_IND. I'm able to register a pin switch and trigger a system reset, but after the reset it seems like the chip is not starting up again. It is not reacting to anything sent over SPI. It only works again after I reset the chip via the reset pin which is not the desired behavior.

    Regards,

    Philipp

  • This is the code:

    case zstackmsg_CmdIDs_ZDO_LEAVE_IND:
    {
    MSTI_setPollRate(0);
    PIN_setOutputValue(PinAttRepInt_handle, Board_Int2,1);
    Task_sleep(100);
    PIN_setOutputValue(PinAttRepInt_handle, Board_Int2,0);
    deactivateSwitch();
    zstack_sysResetReq_t zstack_sysResetReq = {0};
    zstack_sysResetReq.newNwkState = true;
    zstack_sysResetReq.type = zstack_ResetTypes_DEVICE;
    (void)Zstackapi_sysResetReq(ztsEntity, &zstack_sysResetReq);
    }
    break;
  • Here's a related post: e2e.ti.com/.../2725804

    In your ccfg.c, what are the values of the following?
    - SET_CCFG_BL_CONFIG_BOOTLOADER_ENABLE
    - SET_CCFG_BL_CONFIG_BL_PIN_NUMBER
  • Thanks I was starting up in the ROM Bootloader because I did not set the Pin correctly.

    Regards,

    Philipp