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.

CC2530: ZNP crashs in the network with more than 10 routers

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK, CC2520, CC2538

Hello there,

I'm using the latest version of Z-STACK-HOME 1.2.2a ZNP on CC2530 (default version modified with this path file). I faced a new issue when I use ZNP in a large network with more than 10 routers. the ZNP stops working suddenly and doesn't respond to any serial command. I should sometimes reset it with reset pin and a few times I should reflash it. 

as it doesn't get debug log I can't find why it crashes. can you help me? 

EDIT:

as seen above, suddenly the ZNP stops working since the highlighted line.

in another test, the ZNP continues with an unknown encryption key!

(filtered data: just data with source address: 0x00)

  • You can contact or the Zigbee2MQTT forum for specific questions regarding the modified firmware.  You could also actively debug the CC2530 to pause during the crash state and attempt to determine the reason through the call stack.  Restarting with a faulty NWK key or needing to reflash the device indicates corruption of the NV memory.  You should determine whether the CC2530 is properly powered and ensure that flash writes do not occur below 2.2 V.  Can this be replicated with fewer joining ZRs or is it always the exact same number?  This could help determine what needs to change in your firmware.

    Regards,
    Ryan

  • Hi Ryan

    thank you for your reply.

    yes, I had checked with Koen Kanters. The modifications related to routing, are just done in preinclude.h file as below:

    #define APS_MAX_GROUPS 1
    
    #define NWK_MAX_BINDING_ENTRIES 1
    
    #define MULTICAST_ENABLED FALSE
    
    #define BCAST_DELIVERY_TIME 20
    
    #define MAX_BCAST 12
    
    #define CONCENTRATOR_ENABLE TRUE
    
    #define CONCENTRATOR_DISCOVERY_TIME 60
    
    #define CONCENTRATOR_ROUTE_CACHE TRUE
    
    #define MAX_RTG_SRC_ENTRIES 40
    
    #define MAX_RTG_ENTRIES 40
    
    #define MAX_NEIGHBOR_ENTRIES 16
    
    #define SRC_RTG_EXPIRY_TIME 0
    
    #define HAL_UART_DMA_RX_MAX 128
    
    #define NWK_MAX_DEVICE_LIST 5
    
    #define MAXMEMHEAP 3189

    Based on my tests, the crash problem occurs when the routers' quantity is high, but I don't have any exact number. 

  • The fact remains that you are using a CC2530 with limited RAM availability: https://www.ti.com/lit/swra635 

    You should also check the known Z-Stack CC253X Issues: https://e2e.ti.com/f/1/t/902631 

    Regards,
    Ryan

  • Thank you, Ryan.
    I have done more tests and found a specific way leading to the cc2530 crash.
    In a large network with about 20 routers, I turned off and on 13 routers simultaneously. after turning it on, the routers start sending "route request" command to cc2530 and it crashes.
    can you prefer how I change the value of the above parameter to prevent the crash?

    in the below log, the highlight blue message is when I turned on 13 routers and they started to send "route request" and cc2520 crashed. the mac address mentioned in below messages is my cc2530 mac address.

    I repeated the test and cc2530 crashed again.

  • You should follow the suggestions from the Known Issues and Fixes E2E post which can apply to Z-Stack HA 1.2.2a as well.  For example, stagger device join start times so that the ZC is not overwhelmed with Link Status and Route/Address Request messages.

    Regards,
    Ryan

  • OK Ryan, I am relatively new in z-stack.

    can you explain more? 

    I think a large number of requests at the same time makes cc2530 crash. I want to limit the capability of handling the requests.

  • It is not possible to delay the processing of incoming data packets as some have a limited time window for a response.  The CC2530 is extremely limited due to its small RAM size.  It may be possible to increase NWK_MAX_DATABUFS_* in nwk_globals.c but the optimal solution is to upgrade to the CC2538 device.

    Regards,
    Ryan

  • thank you.

    yes, you are right. but I want to find the max devices/routers number which cc2530 supports. 

    I've checked nwk_globals.h file. 

    1- does NWK_MAX_DEVICE_LIST determine maximum number of devices in the whole network (routers+enddevices) or direct children of coordinator?

    2- does NWK_MAX_ROUTERS determine maximum number of routers in the whole network?

  • NWK_MAX_DEVICE_LIST defines the number of children the coordinator allows to be directly associated, MAX_NEIGHBOR_ ENTRIES controls the number of neighbor entries for each router.  NWK_MAX_ROUTERS should not have an effect on the total number of routers which can join the network, however it is used to reserve space in the device's association table for routers.  You could review swra427 but please note that this was developed using a custom version of Z-Stack HA 1.2.2a and with a CC2538 ZC.

    Regards,
    Ryan