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.

LAUNCHXL-CC1352P: MT_SysResetInd doesn't work in ZNP project of simplelink_zigbee_sdk_plugin_2_20_00_06

Part Number: LAUNCHXL-CC1352P


MT_SysResetInd doesn't work in ZNP project of simplelink_zigbee_sdk_plugin_2_20_00_06.  After checking source code, I find MT_Init is called before NPITask_inititializeTask and this causes MT_SysResetInd doesn't work. If I move MT_SysResetInd to right after NPITask_inititializeTask is called in NPITask_task. It will work. However, I don't think this is an elegant fix so please TIers have a look on this issues and provide fix.

void NPITask_task(void)
{
    // Initialize application
    NPITask_inititializeTask();

    MT_SysResetInd();
    // No return from TestProfile2 process
    NPITask_process();
}

  • Hi YK,

    Thank you for investigating and providing this detailed synopsis, I will follow-up with Software Development to make sure that this is resolved before the next plugin release.

    Regards,
    Ryan
  • Thanks for following up.
  • Software Development suggests adding MT_SysResetInd() to ZNPAppTask_init() after NPITask_createTask(), as such:

    #include "mt_sys.h"
    
    static void ZNPAppTask_init(void)
    {
        // Not used so void'd to muffle compiler warning.
        (void)APP_events;
    
        // Register the current thread with ICall so that the application can
        // send and receive ICALL messages.
        ICall_registerApp(&appEntity, &appSem);
    
        // Capture the application's Entity ID.
        znp_user0Cfg.applicationEntityID = appEntity;
    
        // Configure and create the NPI task.
        NPITask_createTask(ICALL_SERVICE_CLASS_ZSTACK);
    
        /*
         * Copy the extended address from the CCFG area
         * Assumption: the memory in CCFG_IEEE_MAC_0 and CCFG_IEEE_MAC_1
         * is contiguous and LSB first.
         */
        memcpy(znp_user0Cfg.extendedAddress,
               (uint8_t *)&(__ccfg.CCFG_IEEE_MAC_0), ZNPAPP_EXTADDR_LEN);
    
        // Check to see if the CCFG IEEE is valid
        if(memcmp(znp_user0Cfg.extendedAddress, dummyExtAddr, ZNPAPP_EXTADDR_LEN) == 0)
        {
            // No, it isn't valid.  Get the Primary IEEE Address
            memcpy(znp_user0Cfg.extendedAddress,
                   (uint8_t *)(FCFG1_BASE + ZNPAPP_EXTADDR_OFFSET),
                   ZNPAPP_EXTADDR_LEN);
        }
    
    #ifdef NV_RESTORE
        /* Setup the NV driver for the ZStack thread */
        NVOCTP_loadApiPtrs(&znp_user0Cfg.nvFps);
    
        if (znp_user0Cfg.nvFps.initNV)
        {
            znp_user0Cfg.nvFps.initNV(NULL);
        }
    #endif
    
        //Send reset indication message
        MT_SysResetInd();
    }
    

    Regards, Ryan

  • Cool! Thanks for the fixing.