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.

CC2640R2F: YFV (WCSP): BLE 5 Simple Peripheral from SimpleLink SDK 4.30.00.08 advertises, but won't connect on custom board

Part Number: CC2640R2F

We have a custom board based on the CC2640R2FYFVR 2.7x2.7 mm WCSP.  I took the BLE5 Simple Peripheral application, copied it into a new project, modified the board files to match the pin definitions for our board, made the other associated changes to direct the build to use these files, and am running this firmware on our board.  (Using CCS v10 for development)

The device advertises successfully, and the signal strength looks good, but we have been unsuccessful in actually establishing a connection with any client apps.

The previous post on this issue, though with a different CC2640R2F variant, mentions the possibility of issues with the RF front end configuration and/or with the 32 kHz external crystal.  With regard to the front end configuration, the documentation in the [board name].h, and the code in [board name].c files raise some questions.  From the [board file].h comments:

*  Define only one symbol:
*  CC2650EM_7ID    - Differential RF and internal biasing
                      (default for CC2640R2 LaunchPad)
*  CC2650EM_5XD    – Differential RF and external biasing
*  CC2650EM_4XS    – Single-ended RF on RF-P and external biasing
*  CC2640R2DK_CXS  - WCSP: Single-ended RF on RF-N and external biasing
*                    (Note that the WCSP is only tested and characterized for
*                     single ended configuration, and it has a WCSP-specific
*                     PA table)

The comment for WCSP mentions single-ended RF configuration, but our board uses differential RF and internal biasing.  Initial testing was with the CC2650EM_7ID setting since the comment indicates this is the one for differential RF and internal biasing, but the comment about WCSP raises the question as to whether this will work.

The CC2640R2DK_CXS setting does not actually appear in ble_user_config.c, but CC2640R2EM_CXS does.  I tried building the firmware with this value, but the behavior was the same, which is to be expected since the board is not actually using single-ended RF.

The value used here also affects the transmit power table used, so it’s not clear on how to set up the RF configuration for a CC2640R2FYFVR using differential RF and internal biasing with the appropriate transmit power table.  Should all settings associated with CC2650EM_71D work with our board?  Should I set up a different #define to direct it to use the transmit power table for WCSP defined in ble_user_config.c, even though the comments indicate it is intended for single-ended output?

For the 32 kHz crystal, we have an external 32 kHz crystal connected at X32K_Q1 and X32K_Q2.  Board space is extremely limited, and there are no external capacitors connected to the crystal.  The data sheet for the crystal indicates a load capacitance of 7 pF, which is within the 6 to 12 pF range required for the CC2640R2F.  The low-frequency oscillator is configured as follows in ccfg.c:

//#####################################
// Clock settings
//#####################################

#ifndef SET_CCFG_MODE_CONF_SCLK_LF_OPTION
// #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION            0x0        // LF clock derived from High Frequency XOSC
// #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION            0x1        // External LF clock
#define SET_CCFG_MODE_CONF_SCLK_LF_OPTION               0x2        // LF XOSC
// #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION            0x3        // LF RCOSC
#endif

#ifndef SET_CCFG_MODE_CONF_XOSC_CAP_MOD
// #define SET_CCFG_MODE_CONF_XOSC_CAP_MOD              0x0        // Apply cap-array delta
#define SET_CCFG_MODE_CONF_XOSC_CAP_MOD                 0x1        // Don't apply cap-array delta 
#endif

#ifndef SET_CCFG_MODE_CONF_XOSC_CAPARRAY_DELTA
#define SET_CCFG_MODE_CONF_XOSC_CAPARRAY_DELTA          0xFF       // Signed 8-bit value, directly modifying trimmed XOSC cap-array value
#endif

#ifndef SET_CCFG_EXT_LF_CLK_DIO
#define SET_CCFG_EXT_LF_CLK_DIO                         0x01       // DIO number if using external LF clock
#endif

#ifndef SET_CCFG_EXT_LF_CLK_RTC_INCREMENT
#define SET_CCFG_EXT_LF_CLK_RTC_INCREMENT               0x800000   // RTC increment representing the external LF clock frequency
#endif

The CC13x0, CC26x0 SimpleLink Wireless MCU Technical Reference Manual, August 2017 revision, includes a diagram (Figure 6-5. System Clock Muxing) that shows DDI_0_OSC:CTL0.SCLK_LF_SRC_SEL and DDI_0_OSC:CTL0.XOSC_LF_DIG_BYPASS signals used to select the external 32 kHz crystal as the low-frequency clock source.  I am assuming that the line

#define SET_CCFG_MODE_CONF_SCLK_LF_OPTION               0x2        // LF XOSC

Results in the proper setting of these signals as I do not see these manipulated in code (though I have not dug into the TI-RTOS code at this point).

As suggested in another post, I have turned off POWER_SAVING as a possible way to determine whether the 32 kHz crystal is contributing to the issue, but the behavior is the same with POWER_SAVING on or off.

As we continue to dig into this any suggestions/direction on where to look would be appreciated.

Thanks very much.

  • You should check your 24M crystal.

  • As an update to the original post - I had not taken the step of setting the sleep clock accuracy, so added a call to HCI_EXT_SetSCACmd() to change from the default of 40 ppm to 20 ppm to match the specs of the crystal we're using.  After making this change, rather than failing to connect immediately, the client app we're using shows that it is attempting to discover services before disconnecting.  But still will not connect.

    With regard to the 24 MHz crystal, we will have to determine what the best value is for the cap array delta (looking at Section 6.4 of the Hardware Configuration and PCB Design Considerations document).  By "check your 24 MHz crystal", I am assuming you're referring to outputting an unmodulated carrier wave and looking at it with a spectrum analyzer as described in the HF crystal tuning info in section 6.4.  Are there other techniques?

    For the RF front end configuration, using CC2650EM_7ID to configure differential RF and internal biasing seems to be working since we have good signal strength during advertising, though we're less sure about the transmit power table for the WCSP.  The comment in [board file].h about the WCSP only being tested and characterized for single-ended RF is a little unsettling, but it does appear to be transmitting fine with differential RF.

  • Hi,

    One additional resource that may interest you in this porting is the chapter below of the BLE User's Guide. 

    https://dev.ti.com/tirex/explore/content/simplelink_cc2640r2_sdk_4_30_00_08/docs/ble5stack/ble_user_guide/html/ble-stack-5.x-guide/ble-stack-5-index-cc2640.html#running-the-sdk-on-custom-hardware

    Also, I just want to be sure you perused the application note below, which contains details to configure the crystal:

    https://www.ti.com/lit/an/swra640e/swra640e.pdf

    I will notify a colleague in the hardware team and try to find additional resources that may help you.

    Hope this helps,

    Rafael

  • Thanks, Rafael.  Those are the two documents I've been working from.  The thinking at the moment is that the 32 kHz crystal is not working, based on on the dialog in this post:  [Resolved] CC2640 - LF clock is not working - Bluetooth® forum - Bluetooth® - TI E2E support forums

    and the statement at the end of section 6.1 in swra640e.  (low-frequency oscillator requires external capacitors to operate properly)

    I am going to map the low-frequency clock to an output pin to verify this, and change the firmware to work without an external 32 kHz crystal as described in the BLE 5 stack users' guide and swra499c, and see if that works on our device.

  • Tony Kobet said:
    For the RF front end configuration, using CC2650EM_7ID to configure differential RF and internal biasing seems to be working

    If you set this define wrong you will have problem with RF. If the option is not available at ble_user_config.c then you have to create it. At one of my product development I created the define CC2650EM_4IS for single ended internal bias RF configuration.

    You mentioned that you do not have any external caps at 32Khz, that maybe another problem.

    -kel

  • If you have designed your HW for differential RF with internal biasing you need to set the CC2650EM_7ID define. This will then set the appropriate internal RF configuration and select the differential output PA table. Note that the output impedance of the WSCP is slightly different from the QFN and TI has never tested differential operation on the WCSP package. As such, there is no guarantee that the differential reference design for QFN will work optimally on the WCSP. You should measure the conducted 2nd and 3rd harmonic levels, as well as doing a BLE RF-PHY test to verify that you are within regulatory requirements as well as the Bluetooth specification. 

    I think it is pretty clear that your problem is associated with the real time clock. Not having external capacitors on the 32k crystal is not an option. This will definitely lead to the frequency being way off, and it will also potentially lead to unstable operation (like crystal not starting, etc.). If you do not have room for load capacitors, an alternative is to do this: www.ti.com/.../swra499

    HCI_EXT_SetSCACmd() does not have to be set to the initial tolerance of your crystal. Rather on the contrary, you should set it slightly higher than the total expected tolerance of your clock, this will include initial tolerance, temperature and ageing. If you expect a large crystal frequency offset, as in your case, you can set it to the maximum (500 ppm) to give the BLE Stack even more tolerance. 

    You should also go through this document: www.ti.com/.../swra640

    /F

  • The RCOSC / crystal-less option has been working well so far with our board.  Repeated connect/disconnect has been working, and connection is being maintained over a period of minutes, so, so far so good.

    fredrikgk said:

    As such, there is no guarantee that the differential reference design for QFN will work optimally on the WCSP. You should measure the conducted 2nd and 3rd harmonic levels, as well as doing a BLE RF-PHY test to verify that you are within regulatory requirements as well as the Bluetooth specification. 

    Thanks very much for this info.  We'll take a look at this.

  • Tony Kobet said:
    The RCOSC / crystal-less option has been working well so far with our board.  Repeated connect/disconnect has been working, and connection is being maintained over a period of minutes, so, so far so good.

    Good to hear! This also confirms the theory that your problem was related to 32 kHz accuracy.