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 runs only after plugging into CC-Debugger

Other Parts Discussed in Thread: Z-STACK, CC2530, CC-DEBUGGER, CC253

Hi,

I'm using the CC2530 with a custom board and, right now, the Z-Stack "GenericApp" for testing.

Everything works fine while debugging using the CC-Debugger and EW8051 (7.60.1). But, after unplugging the device from the debugger and resetting it (power-cycle or reset button), it stops running (no LED/UART/Wireless activity). I need to plug it into the Debugger (and sometimes unplug it again) and it starts working again. What could be the problem?

  • Hi Markus,

    I have a few suggestions:

    1. Try to erase the FLASH with smartRF flash programmer
      (be sure check the "retain IEEE" address")
      And then download the firmware again by using the IAR.
      Unplug and see what heppens then. 
    2. Ensure that your board doesn't sets cc253's reset pin to 0v.

    One more thing, does your board includes 32Khz crystal?

     

    Br,

    Igor. 

  • Thanks for your answer! I tried the Flash-Programmer (First just for
    erasing and Download&Debug in IAR, secondly for erasing and programming
    the Intel-Hex-File) -- same behaviour.
    
    The Reset-Pin is not connected to GND (checked continuity and tried a
    different board - still the same).
    
    And yes, I do have an external 32 kHz crystal connected.
    
    Any other suggestions I could look into?
  • Hi Markus,

    Can you please attach a zip of your GenericApp.c, GenericApp.h and Zmain.c.

    Also please add to the zip file a list of "Defined Symbols" (you can find it in:

    project options->C/C++ compiler->Preprocessor tab->Defined symbols window).

    Last thing, if you don't mind, it would be nice to have also the schematic of your

    board, especially the part that involves the P2_1, P2_2 (debug connector) and

    cc2530 reset circuity.

    I'll take a look a little bit later and maybe come with some other idea.

     

    By the way, once the board disconnected from the CC Debugger it runs awhile

    and then stop responding, or it just stops at the moment you applying power?

     

    Br,

    Igor 

  • The files are attached. Defined symbols are:

    HAL_LED=TRUE
    HAL_KEY=FALSE

    And in the cfg-Files:

    -DSECURE=0
    -DZG_SECURE_DYNAMIC=0
    //-DZIGBEEPRO
    //-DREFLECTOR

    -DCPU32MHZ                    // CC2530s Run at 32MHz
    -DROOT=__near_func            // MAC/ZMAC code in NEAR
    /* MAC Settings */
    -DMAC_CFG_TX_DATA_MAX=3
    -DMAC_CFG_TX_MAX=6
    -DMAC_CFG_RX_MAX=3
    -DHAL_UART=TRUE
    -DHAL_UART_DMA=2
    -DSERIAL_PORT=1
    -DSERIAL_BAUD=HAL_UART_BR_38400
    -DSERIAL_APP_TX_MAX=80
    -DLOGICAL_TYPE_DEFAULT=ZG_DEVICETYPE_ENDDEVICE

    Everything else is standard. I'm using the Non-Pro Enddevice library.
    Unfortunately, I don't have a layout at hand. I'm resetting by powering off right now.

    I did some LED-debugging and it seems to hang in ZMacInit(). Any clue what could be wrong?

    Source.zip
  • Hi Markus,

    I'll walk through your code a little bit later,

    meanwhile try the following:

    1. Add "OSC32K_CRYSTAL_INSTALLED=FALSE" and 
      "NWK_AUTO_POLL" compilation flags in "project options ->
      C/C++ Compiler->Preprocessor (tab)->Defined symbols (sub window). 
    2. Compile and run with the CC debugger and without it.

    Br,

    Igor

  • The OSC32K_CRYSTAL_INSTALLED=FALSE Compiler-Flag helped, I can't thank you enough! :-). Are there some options I need to configure if I want to use the external crystal?

    Also, do I need to set the NWK_AUTO_POLL flag if I do not want to receive data? (My goal is longest battery life)

  • Hi Markus,

    I'm glad it helped you.


    However, disabling the OSC32K_CRYSTAL_INSTALLED means

    that the 32Khz crystal on your board isn't starting (working properly).


    Regarding battery life issue, read the "Power Management For The CC2530.pdf".

    It's a good source of information about power saving on ZigBee end devices.

    You can find this document in your zstack installation folder/Documents/CC2530/


    Br,

    Igor

     

  • Hi Markus,

     

    Somehow I've managed to miss one of the questions in your last post:

    "Are there some options I need to configure if I want to use the external crystal?".

     

    Answer:

    All the ZigBee boards I've designed with 32KHz external crystal worked fine

    without any extra configurations in Z-Stack.

    There was one board designed specifically to be a Router,

    so the 32KHz crystal wasn't part of the design in a first place.

    In order to work with this kind of board I've included the 

    OSC32K_CRYSTAL_INSTALLED=FALSE compilation option.

     

    Br,

    Igor