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.

Porting ZAP sample applications to other MCU's

Other Parts Discussed in Thread: Z-STACK, CC2530

Hello,

I am in the processing of porting ZAP to an MCU other than the MSP430 and am having some problems with hal_sleep.c.  There are a number of macro functions that are used but as far as I can tell are not defined anywhere in the MSP430 ZAP or Zstack project trees.  Specifically, the macros are:

MAC_RADIO_TIMER_WAKE_UP(), MAC_RADIO_TIMER_SLEEP(), HAL_MAC_SLEEP_TIMER_SPEED_UP(), HAL_MAC_SLEEP_TIMER_SLOW_DOWN(),

HAL_MAC_SLEEP_TIMER_COMPARE(), HAL_MAC_SLEEP_TIMER_SET_COMPARE(), HAL_MAC_SLEEP_TIMER_TAR(),

HAL_MAC_SLEEP_TIMER_RESTART(),  HAL_BEACON_ENABLE_EARLY_WAKEUP()

I can't find any explanation of what these functions need to do.

Can you help?

Thanks

  • Your observation is really unexpected - I just grepped for some of the macros that you listed in a ZAP 2.5.0 sample application and they do not exist. But they do exist in a Z-Stack sample application for the MSP430. So, perhaps you have started porting the wrong code / sample application?

     

  • I've installed ZAP-MSP430-2.5.0.exe (swrc173c).  The hal_sleepc. that I am using was orignally in  C:\Texas Instruments\ZAP-MSP430-2.5.0\Components\hal\target\MSP2618ZAP.  After going back and checking, I did end up finding MAC_RADIO_TIMER_SLEEP() and MAC_RADIO_WAKE _UP() in the Zstack project (C:\Texas Instruments\ZStack-CC2530-2.5.0\Components\mac\low_level\srf04\single_chip\mac_radio_defs.h) but not find the rest of them in the ZAP or Zstack projects.

     

  • Ok - so there is the source of your problems - you brought in a .c module that includes a bunch of .h files that are relying on macros that should not be part of a build of a sample application for a network processor, namely the ZNP. You should not want anything as complicated as hal_sleep.c which is dependent on MAC state and functions, which are of no concern to the host application - the MAC is over on the ZNP. Shouldn't the vendor of the other MCU have examples of how to put it into power saving modes?

  • Yes they do.  So it sounds like I just want to not use hal_sleep.c in my ZAP port, correct?  I will have other code in the Application processor's program that handles sleep modes.

    I am assuming that the CC2530 running ZNP can wake up my application processor under certain circumstances.

    Thanks

  • On SPI connection, you will see that ZNP pulls SRDY from high to low to signal to host processor that a new transaction is ready. Host must act on it - but all of that is described in the ZNP User's Guide.