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.

CC26xx standby & wakeup issue

Other Parts Discussed in Thread: CC2650

Hi

  I am working on a ble project, that using cc2650 chip. It require a long time standby and waking up by button. I made some test code similar with the pinStandby example and i found an issue with cc2650 standby state.

  When the cc2650 is in standby state, i measure on the 32768Hz XTAL pin with oscilloscope probe, it is running properly. But if i create some EMI noise at the LF XTAL pin (touching it by hand) then the LF OSC stop, in some case it can not be running again (measured on  oscilloscope) and therefore  i can not wake up the cpu until i reset the cpu.

  As far as i known, the internal watchdog of cc26xx do not work at standby state, am i right? So please suggest me some solution for this issue. Any help would be appreciate.

  • Hello Vinh,

    Your issue seems be that your are not adhering to the device maximum ratings by allowing direct touch / noise ingress to the XTAL. I suggest reviewing your layout/shielding or using a pre-certified module.

    Best wishes
  • Hi JXS!

    You say it is not related to device maximum ratings? But i did get the same result with CC2650EM-7ID + SMARTRF06 board. Here is my test code, the wake up event set the led on, the standby event set the led off.

    static void nobletaskFxn(UArg a0, UArg a1);
    static uint8_t pwrSwitchNotifyCb(uint8_t eventType, uint32_t *eventArg, uint32_t *clientArg);
    static PIN_State  ledPins;
    static PIN_Handle hLedPins=NULL;
    #if defined(CC2650DK_7ID)
    #define Board_LED0 Board_DK_LED1
    #endif
    int main()
    {
      static Task_Struct myTask;
      static uint8_t myTaskStack[512];
      static Power_NotifyObj rFSwitchPowerNotifyObj;
      PIN_Config ledPinsCfg[] =
      {
        Board_LED0    | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,     /* LED initially off             */
        PIN_TERMINATE
      };
    
      PIN_init(BoardGpioInitTable);
      hLedPins = PIN_open(&ledPins, ledPinsCfg);
      /* Power Notify */
      Power_registerNotify(&rFSwitchPowerNotifyObj,
                         PowerCC26XX_ENTERING_STANDBY | PowerCC26XX_AWAKE_STANDBY,
                         (Power_NotifyFxn) pwrSwitchNotifyCb, NULL);
    
      /* Configure task. */
      Task_Params taskParams;
      Task_Params_init(&taskParams);
      taskParams.stack = myTaskStack;
      taskParams.stackSize = sizeof(myTaskStack);
      Task_construct(&myTask, nobletaskFxn, &taskParams, NULL);
      /* enable interrupts and start SYS/BIOS */
      BIOS_start();
    }
    
    static Semaphore_Struct wakeup_sem;
    static void wakeupCallback(PIN_Handle hPin, PIN_Id pinId)
    {
      Semaphore_post((Semaphore_Handle)&wakeup_sem);
    }
    static void nobletaskFxn(UArg a0, UArg a1){
      /* Configure semaphore. */
      Semaphore_Params semParams;
      Semaphore_Params_init(&semParams);
      semParams.mode = Semaphore_Mode_BINARY;
      Semaphore_construct(&wakeup_sem, 0, &semParams);
      /* Initialize KEY pins. */
      PIN_State  wakeupPins;
      PIN_Handle hwakeupPins;
      #if defined(MH_TAG)
      PIN_Config wakeupPinsCfg[] =
      {
        Board_KEY_WAKEUP     | PIN_GPIO_OUTPUT_DIS | PIN_INPUT_EN | PIN_PULLDOWN | PIN_HYSTERESIS,
        Board_KEY_SELECT    | PIN_GPIO_OUTPUT_DIS  | PIN_INPUT_EN  |  PIN_PULLDOWN | PIN_HYSTERESIS,
        PIN_TERMINATE
      };
      hwakeupPins = PIN_open(&wakeupPins, wakeupPinsCfg);
      #ifdef POWER_SAVING
      PIN_setConfig(hwakeupPins, PIN_BM_IRQ, Board_KEY_WAKEUP  | PIN_IRQ_POSEDGE);
      PIN_setConfig(hwakeupPins, PIN_BM_IRQ, Board_KEY_SELECT  | PIN_IRQ_POSEDGE);
      //Enable wakeup
      PIN_setConfig(hwakeupPins, PINCC26XX_BM_WAKEUP, Board_KEY_WAKEUP | PINCC26XX_WAKEUP_POSEDGE);
      PIN_setConfig(hwakeupPins, PINCC26XX_BM_WAKEUP, Board_KEY_SELECT | PINCC26XX_WAKEUP_POSEDGE);
      #endif
      #elif defined(CC2650STK) || defined(CC2650DK_7ID)
      #define Board_KEY_WAKEUP Board_KEY_UP
      PIN_Config wakeupPinsCfg[] =
      {
        Board_KEY_WAKEUP     | PIN_GPIO_OUTPUT_DIS | PIN_INPUT_EN | PIN_PULLUP | PIN_HYSTERESIS,
        Board_KEY_SELECT    | PIN_GPIO_OUTPUT_DIS  | PIN_INPUT_EN  |  PIN_PULLUP | PIN_HYSTERESIS,
        PIN_TERMINATE
      };
      hwakeupPins = PIN_open(&wakeupPins, wakeupPinsCfg);
      #ifdef POWER_SAVING
      PIN_setConfig(hwakeupPins, PIN_BM_IRQ, Board_KEY_WAKEUP  | PIN_IRQ_NEGEDGE);
      PIN_setConfig(hwakeupPins, PIN_BM_IRQ, Board_KEY_SELECT  | PIN_IRQ_NEGEDGE);
      //Enable wakeup
      PIN_setConfig(hwakeupPins, PINCC26XX_BM_WAKEUP, Board_KEY_WAKEUP | PINCC26XX_WAKEUP_NEGEDGE);
      PIN_setConfig(hwakeupPins, PINCC26XX_BM_WAKEUP, Board_KEY_SELECT | PINCC26XX_WAKEUP_NEGEDGE);
      #endif
      #else
      #error "***ERROR*** Invalid Board Specified! Please see board.h for options."
      #endif
      PIN_registerIntCb(hwakeupPins, wakeupCallback);
      for(;;){
        Semaphore_pend((Semaphore_Handle)&wakeup_sem, BIOS_WAIT_FOREVER);
        uint32_t n=10000000;
        while(n--);
      }
    }
    
    static uint8_t pwrSwitchNotifyCb(uint8_t eventType, uint32_t *eventArg,
                                    uint32_t *clientArg)
    {
      if (eventType == PowerCC26XX_ENTERING_STANDBY)
      {
        // Power down RF Switch
        PIN_setOutputValue(hLedPins, Board_LED0, 0);
      }
      else if (eventType == PowerCC26XX_AWAKE_STANDBY)
      {
        // Power up RF Switch
        PIN_setOutputValue(hLedPins, Board_LED0, 1);
      }
    
      // Notification handled successfully
      return Power_NOTIFYDONE;
    }

    pls review my project config attached below. Can you confirm my issue in your lab? Is there is any software solution, or i have to shielding my board? Pls suggest me the best solution, thank you

    app_ble.cfg

  • I think this is a serious problem, it's never seen on other MCUs i worked on. That because the MCU can not going back to a known state, the LF OSC (or may be HF OSC) is stopped forever, the watchdog is not working.

    I made another test, that using LF ROSC and disable LF XOSC in ccfg, the problem still exist if i create a strong enough EMI noise.

    I hope you will provide some workaround soon.

    Regards!