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 Wakeup control

Other Parts Discussed in Thread: CC2530, CC2531

Hello:

I have a beginners question. So please be patient with me.

I have a cc2530 custom board. I'm using genericApp from distributed stack with HAL changed according with my board.

My network has a coordinator and an end device. My end device joins the network and the "Hello world" message shows (repeatedly) at the cc2531/USB dongle sniffer.

All seems ok.

I'm monitoring energy consumption at the end device powe line using an oscilloscope (osc) and a small resistor. My end device is using energy saving compiler options and i'm trying to determine if it is actually going to sleep or not and using which mode.

In my osc a 1ms length burst of energy consumption is appearing with a 100ms time interval. Also larger consumption bursts show up with a time interval related with the "hello world message". I figured this out all by myself because this bursts also show at the sniffer (this one I control).

So my question is what is causing the 100ms spaced 1ms burst? And how can I change this.

Tks in advance

Pp

 

  • Could it be this:


    #if (defined HAL_KEY) && (HAL_KEY == TRUE)
        /* Check for keys */
        HalKeyPoll();

        /* if interrupt disabled, do next polling */
        if (!Hal_KeyIntEnable)
        {
          osal_start_timerEx( Hal_TaskID, HAL_KEY_EVENT, 100);
        }
    #endif // HAL_KEY

     

    You should search this E2E for all of the many, many tips and tricks discussed with respect to ZED power savings, poll rates, sleep modes, etc.

     


  • Hello:

     Tks for your answer.

    I'm using interrupts so its not that particular timer that is preventing power down. I'm still looking for the solution and I tried a different approach.

    I'm trying to compile a program that blinks a led and goes into power down mode (any mode PM2 or PM3).

    My program compiled ok but when linking an error occurs: 

                                        Fatal Error[e72]: Segment SLEEP_CODE must be defined in a segment definition option (-Z, -b or -P)  

     

    if I used default linker file (lnk51ew_CC2530F256_banked.xcl)

    and if I use f8w2530.xcl linker file a 

                                        Fatal Error[e72]: Segment PDATA_Z must be defined in a segment definition option (-Z, -b or -P)

     error occurs.

    In both cases i'm using hal_defs.h, hal_mcu.h, hal_types.h, ioCC2530.h from zstack_2.5.0 .

    Also modified versions of hal_sleep.h and hal_sleep.c.

    Both these two files where striped of any zigbee related variables keeping sleep related ones only.

    pp_alegoria


  • So just copy from f8w2530.xcl what you need into the custom linker control file that you are creating:

    //
    // Sleep PCON instruction must be 4-byte aligned.
    //
    -D_SLEEP_CODE_SPACE_START=(_CODE_END-7)
    -D_SLEEP_CODE_SPACE_END=(_CODE_END)
    -Z(CODE)SLEEP_CODE=_SLEEP_CODE_SPACE_START-_SLEEP_CODE_SPACE_END
    //