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.

CC2652R: Device taking too long to initialize/start up

Part Number: CC2652R


Hi

We have done more comparisons for device initializing

1. DMM project (out of resource explorer) takes around 300 - 500ms, and increases linearly on adding more groups
2. My custom project takes around 1600-2000ms to initialize and increases linearly on adding more groups.
3. Custom project has custom .opts settings, so applied the same on the DMM project and the initialization delay is observed again of about 1500 - 2000ms

Delays vary between restarts.
Please can you suggest what could be affecting the initializing by so much and any suggestions to optimize.

Thanks
Akhilesh

Listed below are additional .opts changes

-DNVOCMP_NVPAGES=4

-DBDB_NETWORK_FORMATION_CAPABILITY_ENABLED=0
-DBDB_FINDING_BINDING_CAPABILITY_ENABLED=0
-DDISABLE_GREENPOWER_BASIC_PROXY=1
-DSECURE=1
-DTC_LINKKEY_JOIN=1
-DMULTICAST_ENABLED=FALSE
-DZDNWKMGR_MIN_TRANSMISSIONS=0  

-DAPS_MAX_GROUPS=100

-DBCAST_DELIVERY_TIME=30
-DMAX_BCAST=30
-DMAX_BCAST_RETRIES=2
-DPASSIVE_ACK_TIMEOUT=5

-DMAX_RTG_ENTRIES=200
-DROUTE_EXPIRY_TIME=255
-DDEFAULT_ROUTE_REQUEST_RADIUS=25
-DMAX_RREQ_ENTRIES=20
-DMTO_RREQ_LIMIT_TIME=5000
-DMAX_NEIGHBOR_ENTRIES=200

-DLINK_DOWN_TRIGGER=12
-DNWK_LINK_STATUS_PERIOD=60
-DNWK_ROUTE_AGE_LIMIT=15   

-DNWK_MAX_BINDING_ENTRIES=1
-DNWK_MAX_DEVICE_LIST=100
-DNWK_INDIRECT_MSG_TIMEOUT=7

-DAPSC_ACK_WAIT_DURATION_POLLED=2000

  • Hi Akhilesh,

    Thanks for providing the link to your related post.  Increasing NWK_MAX_DEVICE_LIST and APS_MAX_GROUPS will also increase the number of association and group tables which must be checked and restored from NV memory upon restarting a device.  Given these limitations and the current NV implementation, the delay you've observed is expected.  You can try to implement hot NV items as recommended by Aries in the prior thread, or further evaluate different NVOCMP_FAST* definition configurations from the nvocmp.c file.

    Regards,
    Ryan

  • Hi Ryan,

    Thanks for the input, will try using hot NV as well as NVOCMP_FAST and update.

    Also what for a router, NWK_MAX_DEVICE_LIST refers to end device children right. Do these times get affected even if there are no children ?

    Thanks
    Akhilesh

    For reference:
    You can try to fix "nvocmp.c" to support “HOT NV”.
    2262.nvocmp.c
    7608.nvocmp_hot_ids.h

  • That is correct, and each entry is initialized even if children have not connected, thus the overall startup times are affected.  Another critical definition I had not yet identified is ZDSECMGR_TC_DEVICE_MAX (for ZC only) which should describe the total number of devices, based on APS keys, a trust center can allow to join the network.  You should also greatly reduce MAX_NEIGHBOR_ENTRIES as it is not feasible for devices to have this many neighbors alongside child nodes.

    Regards,
    Ryan

  • Hi Ryan,

    The settings above are what we use for routers. Have shared ZNP settings below.
    We use very less end-devices, so is it safe for us to reduce NWK_MAX_DEVICE_LIST to a lower value for routers. Is this also during commissioning ?

    What is impact of MAX_NEIGBOUR_ENTRIES, I know that it affects groupcast retry behaviour and link status, is there any further impact ?

    The above questions aside, we have tested the hot items and it has reduced the time by almost 50%, that is very useful for us. Thanks a lot for the suggestion

    Thanks
    Akhilesh

    ZNP settings (In addition to default opts) , Please also do suggest any changes for these

    #define INCLUDE_REVISION_INFORMATION
    #define MT_SYS_KEY_MANAGEMENT 1
    #define FEATURE_NVEXID 1

    // Save memory
    #undef NWK_MAX_BINDING_ENTRIES
    #define NWK_MAX_BINDING_ENTRIES 1
    #undef APS_MAX_GROUPS
    #define APS_MAX_GROUPS 1

    // Increase NV pages to 3 to allow for bigger device tables
    #undef NVOCMP_NVPAGES
    #define NVOCMP_NVPAGES 3

    // Disabling MULTICAST is required in order for proper group support.
    // If MULTICAST is not disabled, the group adress is not included in the APS header
    #define MULTICAST_ENABLED FALSE

    // Increase the max number of boardcasts, the default broadcast delivery time is 3 seconds
    // with the value below this will allow for 1 broadcast every 0.15 second
    #define MAX_BCAST 30

    /**
     * Enable MTO routing
     */
    #define CONCENTRATOR_ENABLE TRUE
    #define CONCENTRATOR_DISCOVERY_TIME 250
    #define CONCENTRATOR_ROUTE_CACHE TRUE
    #define MTO_RREQ_LIMIT_TIME 5000
    #define MAX_RTG_SRC_ENTRIES 200
    #define SRC_RTG_EXPIRY_TIME 0
    #define ROUTE_EXPIRY_TIME 0

    /**
     * Scale other device tables appropriately
     */
    #define NWK_MAX_DEVICE_LIST 100
    #define ZDSECMGR_TC_DEVICE_MAX 200
    #define MAX_NEIGHBOR_ENTRIES 100
    #define MAX_RTG_ENTRIES 100

    // nwk link status repeat interval
    #define NWK_LINK_STATUS_PERIOD 60

    // number of failed messages before it marks the neighbor as inactive
    #define LINK_DOWN_TRIGGER 12

    // neighbor table marking neighbors are unstable very fast
    #define NWK_ROUTE_AGE_LIMIT 15

    // route request radius needs to be adjusted to limit the discovery storm in worst case scenario
    #define DEFAULT_ROUTE_REQUEST_RADIUS 15

    // disable frequency agility
    #define ZDNWKMGR_MIN_TRANSMISSIONS 0

    /**
     * Reduce the APS ack wait duration from 6000 ms to 1000 ms (value * 2 = value in ms).
     * This will make requests timeout quicker, in pratice the default timeout of 6000ms is too long.
     */
    #define APSC_ACK_WAIT_DURATION_POLLED 500

    #define DEF_NWK_RADIUS 15
    #define ROUTE_DISCOVERY_TIME 13
  • NWK_MAX_DEVICE_LIST is the number of associated devices (end devices) which can join the node

    MAX_NEIGHBOR_ENTRIES is the number of direct routing devices (routers) which can communicate with the node

    The coordinator and router nodes do not need to be capable of having 100 children and 100 routing neighbors each, given that other routers can be parents of end device children and routers do not have to directly communicate with each other but can indirectly send their messages through other routers.  These values can be greatly reduced.

    Regards,
    Ryan