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.

Optimizing RAM usage on CC2530 with ZNP

Other Parts Discussed in Thread: CC2530

I run a ZNP coordinator on the CC2530 and would like to maximize the routing table size (see my other question).

In order to do this, I guess I need to optimize how the RAM is spread, so that I can assign the maximum RAM to the routing table. I see that I can change the heap size with INT_HEAP_LEN.

The default heap size for routers is 3072 bytes. In the document "Breaking the 400 node ZigBee network barrier", they use slightly more, 3280 bytes.

My questions:

Is the routing table (size defined by MAX_RTG_ENTRIES) assigned in the heap or the stack?

I suppose it's in the stack: (so I need to minimize the heap, to make room for it). What is the minimum heap for ZNP, or what is a good approach to find it?

Are there general guidelines on how to optimize the RAM in CC2530?

Once the heap is settled to the minimum, how I should I find out the maximum routing table size which will still work?

Thanks Philipp

  • Hi Philipp,

    Routing table is placed in the zero-initialized static data area. It's in neither heap nor stack. You can find the RAM usage in the .map file. Please search the map file for theHeap for the heap and rtgTable for the routing table. And, at the end of the map file you will see overall usage of the flash memory and the RAM.

    - Cetri