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.

Need to Save CPU Bandwidth

Other Parts Discussed in Thread: Z-STACK, CC2530EM, TIMAC, CC2520

Hi,

I am working on z-stack and need some help related to it. I have the following hardware with me:

 

Stellaris LM3S9B96-DK

DK-LM3S9B96-EM2 along with CC2520EM mounted on top of it. This module is connected with Stellaris LM3S9B96-DK target

Two CC2530EM connected on SmartRF05 Battery Boards. These two BB board communicate with zigBee daughter card attached with Stellaris LM3S9B96-DK target.

 

So this is my hardware setup. Stellaris LM3S9B96-DK target is running as a coordinator and the battery boards are acting as an end device.

 

My question is, I have very minimum memory and CPU bandwidth on Stellaris LM3S9B96-DK target and I am developing a hard real time application so I have to take care about CPU bandwidth. 

I have started my application development by taking reference from TI's zstack_collector demo. In this demo, a while(1) loop is being used that needs to be called after every few seconds (as mentioned in the source code comments by TI) but I cant afford this loop to be called after every few seconds because it will keep my CPU busy. It is totally a pooling mechanism. I have seen some callbacks that z-stack uses and inform the application via these callbacks but again I have to keep the loop running forever. Is there not any interrupt based mechanism or any other solution? 

 

My second question is:

According to my above hardware setup, my one device will always only receive the data and other will act only transmitter. So do I need to run forever loop in both devices? Can I configure the receiving device in interrupt mode only and move the network management options to my device doing only TX?

 

Question 3:

As I am new in z-stack so I have an entry level question and I hope that you will not mind :-)

Actually when i link my application, I have to provide some pre-compiled libraries to linker and these libraries are "ecc.a, routermtpro.a,  routerpro.a, security.a, timac.a". Why I need to link these libraries? why not the code of these libraries is not a part of z-stack? Why TI has provided these separate libraries? 

 

Huge thanks in advance for your help

 

Best Regards,

Zaheer

  • 1) In place of mounting a CC2520 and running the ZStack on the Stellaris, you could instead mount the CC2530ZNP, that is, a CC2530EM programmed with the ZNP image. The ZNP, ZStack Network Processor, abstracts the entire ZStack to be remote controlled via a serial bus like UART or SPI. Search for ZNP and network processor in this forum.

    2)?

    3)The full source code is available on a case by case basis and only after signing a NDA contract.

     

  • Thanks Harry for your quick response!

    Yes, it is a good solution to use ZNP but I am in final stage of my project and just finalizing the things and I have to demonstrate the working of z-stack with my RTOS.  

     

    Please explain one thing that: does I need to run forever loop on both collector and end device? I am talking about collector and sensor demo. Can I implement interrupt based mechanism on any end?

     

    Once again thanks for your help. 

     

  • So why don't you add a task to your RTOS that is scheduled to run every 100 msec (play with the interval to suit your performance needs over the air versus on your other work) and this task will run the forever loop and yield whenever the loop runs no "OSAL task", which is to say, when power manager would be called.