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.

Purpose of 32,768kHz Quarz - Device not advertising

Other Parts Discussed in Thread: CC2640, BLE-STACK

Hy,

I have a simple PCB, holding the CC2640 and a 24MHz Quarz (And a LED, Capacitors etc.). That's about it. No 32,768kHz Quarz. Everything looks fine, I can download and debug using CCS. But the device does no advertising. I use the same code without any issues for another board that is pretty much the same, but this has a 32.768kHz.

I found the switch SET_CCFG_MODE_CONF_SCLK_LF_OPTION in ccfg.c. I used a different setting by adding the following lines to ccfg_appBLE.c

#include <startup_files/ccfg.c>
#undef SET_CCFG_MODE_CONF_SCLK_LF_OPTION
//************************************************** /
/ SCLK LF option
//**************************************************
#define SET_CCFG_MODE_CONF_SCLK_LF_OPTION 0x0 // Low frequency clock derived from High Frequency XOSC


What else could be the reason for my board not advertising? When stepping through the code and placing breakpoints, I see that the state GAPROLE_STARTED  and GAPROLE_ADVERTISING is set when debugging processStateChangeEvt
Best regards
Harald

  • Hello Harald,

    Couple of things. First, please review the CC26xx published erratum (SWRZ058 - Feb 2015) related to RCOSC_LF. Second, it looks like you have a simple C coding mistake since you are #def'ing after the ccfg.c is included. This change has no effect to the SW. Recommend copying ccfg.c into ccfg_appBLE.c, then make your change.

    Also, I'm assuming you are only doing Broadcaster role since BLE connections aren't supported in BLE-Stack 2.0 on PG2.2 silicon without a 32kHz crystal.

    Best wishes
  • Thanks a lot for the very quick and good response.
    You are right, I misunderstood the ccfg.c as only doing the defines, I missed the #define DEFAULT_CCFG_MODE_CONF part in line #338

    > Also, I'm assuming you are only doing Broadcaster role since BLE connections aren't
    > supported in BLE-Stack 2.0 on PG2.2 silicon without a 32kHz crystal.

    That is actually the response to my question. I didn't find any hint to this issue, which document would I have needed to read?

    But still, it should be possible to run SimpleBroadcaster on a device without 32,768kHz Quarz? I made the changes to ccfg.c, compiled the SimpleBroadcaster Stack and Application and it shows to behave in the same way: I get StateChangeEvt, first "GAPROLE_STARTED" then "GAPROLE_ADVERTISING" but can't see the device, neither in BTool nor in Android BLE device monitor.
    Is it possible that it's mandatory to have the 32,768kHz Quarz?