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.

CC2540 stops advertising after a few packets with POWER_SAVING

Other Parts Discussed in Thread: CC2540

Hi,

I'm running on a custom cc2540 board with no peripherals and external 32khz + 32Mhz crystals.I tried both the SimpleBLEBroadcaster and SimpleBLEPeripheral examples from the BLE 1.3.2 SDK. With both examples, advertisement is 100 ms continuous and works fine when power saving is disabled. 

When recompiled with POWER_SAVING though, the board advertises 4 times (100 ms apart), and then the code gets stuck in a loop. The board draws about 9 mA when this happens, and the CPU is stuck in a tight loop somewhere around llStopTimer2 (no source). . 

I've seen post about this happening when using the internal RC oscillator, but this isn't the case. Any ideas on what might be happening? 

  • I'm seeing this same problem.  Have you found a solution?

  • For what it's worth - had the same problem with 1.4.0 where it would only advertise once with internal RC 32khz oscillator, but I had to add

    #define XOSC32K_INSTALLED             FALSE

    in hal_board_cfg.h before this section which I missed

    // For non-USB, assume external, unless an internal crystal is explicitly indicated.
    #if !defined (XOSC32K_INSTALLED) || (defined (XOSC32K_INSTALLED) && (XOSC32K_INSTALLED == TRUE))
    #define OSC_32KHZ                     EXTERNAL_CRYSTAL_OSC
    #else
    #define OSC_32KHZ                     INTERNAL_RC_OSC
    #endif

    And now that part works perfect :)  If only it would stop disconnecting at random.