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.

CC2652R: uBLE not actually advertising

Part Number: CC2652R
Other Parts Discussed in Thread: SYSCONFIG, CC2640, , BOOSTXL-SHARP128

As the title says, Micro BLE/uBLE does not advertise after the uGAP is supposedly running. I have attached part of my code that starts everything, but it does not appear to work. Below is the bulk of my test code.

static void main_task(UArg a0, UArg a1)
{
    volatile uint32 keyHwi;
    bStatus_t status = FAILURE;
    uint16_t advInterval = 160;
    uint16_t advCount = 0;
    int8 txStrength = 4;
    int8 advType = UBLE_ADVTYPE_ADV_NC;
//    uint8_t beaconLength = 30;
    uint8_t bleAddress[B_ADDR_LEN];
    static uint8_t beacon[] = {
                               0x02, 0x01, 0x06,
                               0x09, 0x09, 'S', 'u', 's', 's', 'u', 'r', 'o',
                               0x04, 0xFF, 0xC0, 0xFF, 0xEE
//                               0x4C, 0x00, // Company identifier code (0x004C == Apple)
//                               0x02, 0x15, // iBeacon advertisement indicator
//                               0xe2, 0xc5, 0x6d, 0xb5, 0xdf, 0xfb, 0x48, 0xd2, 0xb0, 0x60, 0xd0, 0xf5, 0xa7, 0x10, 0x96, 0xe0, // ProximityUUID
//                               0x00, 0x00, // Major
//                               0x00, 0x00, // Minor
//                               0xc5 // The 2's complement of the MeasuredPower
    };
    ugapBcastCBs_t pCBs = {
                             beacon_bcast_stateChangeCB,
                             beacon_bcast_advPrepareCB,
                             beacon_bcast_advDoneCB
    };

    // Create an RTOS event used to wake up this application to process events.
    syncEvent = Event_create(NULL, NULL);

    // Create an RTOS queue for message from profile to be sent to app.
    mainAppMsgQueueHandle = Util_constructQueue(&mainAppMsgQueue);

    // Default is not to switch antenna
    uble_registerAntSwitchCB(NULL);

    status = uble_stackInit(
            UBLE_ADDRTYPE_PUBLIC,   // Use the stored public address for testing
            NULL,                   // No static address to set
            myPostEvtProxyCB,       // Callback to process the message in this context
            RF_TIME_CRITICAL         // Don't do it; when you want to go do it
    );
    if(status != SUCCESS) {
        System_printf("uble_stackInit returned %d %s %d\n", status, __FUNCTION__, __LINE__);
        return;
    }
    uble_setParameter(UBLE_PARAM_ADVINTERVAL, sizeof(uint16), &advInterval);
    if(status != SUCCESS) {
        System_printf("uble_setParameter returned %d %s %d\n", status, __FUNCTION__, __LINE__);
        return;
    }
    uble_setParameter(UBLE_PARAM_TXPOWER, sizeof(int8), &txStrength);
    if(status != SUCCESS) {
        System_printf("uble_setParameter returned %d %s %d\n", status, __FUNCTION__, __LINE__);
        return;
    }
    uble_setParameter(UBLE_PARAM_ADVTYPE, sizeof(int8), &advType);
    if(status != SUCCESS) {
        System_printf("uble_setParameter returned %d %s %d\n", status, __FUNCTION__, __LINE__);
        return;
    }
    uble_setParameter(UBLE_PARAM_ADVDATA, sizeof(beacon), beacon);
    if(status != SUCCESS) {
        System_printf("uble_setParameter returned %d %s %d\n", status, __FUNCTION__, __LINE__);
        return;
    }

    uble_getAddr(UBLE_ADDRTYPE_PUBLIC, bleAddress);
    System_printf("BLE Address %02x:%02x:%02x:%02x:%02x:%02x\n",
                  bleAddress[0],
                  bleAddress[1],
                  bleAddress[2],
                  bleAddress[3],
                  bleAddress[4],
                  bleAddress[5]
    );

    status = ugap_bcastInit(&pCBs);
    if(status != SUCCESS) {
        System_printf("ugap_bcastInit returned %d %s %d\n", status, __FUNCTION__, __LINE__);
        return;
    }
    ugap_bcastSetDuty(1, 0);
    ugap_bcastStart(advCount);
    if(status != SUCCESS) {
        System_printf("ugap_bcastStart returned %d %s %d\n", status, __FUNCTION__, __LINE__);
        return;
    }

    // This isn't really doing anything. The callback calls uble_processMsg() directly
    for (;;)
    {
        // Waits for an event to be posted associated with the calling thread.
        // Note that an event associated with a thread is posted when a
        // message is queued to the message receive queue of the thread
        Event_pend(syncEvent, Event_Id_NONE, UTIL_QUEUE_EVENT_ID, BIOS_WAIT_FOREVER);

        // If RTOS queue is not empty, process app message.
        while (!Queue_empty(mainAppMsgQueueHandle))
        {
            ubtEvt_t *pMsg;

            // malloc() is not thread safe. Must disable HWI.
            keyHwi = Hwi_disable();
            pMsg = (ubtEvt_t *) Util_dequeueMsg(mainAppMsgQueueHandle);
            Hwi_restore(keyHwi);

            if (pMsg)
            {
                // Process message.
                uble_processMsg();

                // free() is not thread safe. Must disable HWI.
                keyHwi = Hwi_disable();

                // Free the space from the message.
                free(pMsg);
                Hwi_restore(keyHwi);
            }
        }
    }
}


void myPostEvtProxyCB(void)
{
    //TODO: Append a message to the MQ to deal with the data and resume immediately
    // For now:
    System_printf("uBLE Callback %s %d\n", __FUNCTION__, __LINE__);
    uble_processMsg();
}

void beacon_bcast_stateChangeCB(ugapBcastState_t newState)
{
    System_printf("State Callback %d %s %d\n", newState, __FUNCTION__, __LINE__);
    return;
}

void beacon_bcast_advPrepareCB(void)
{
    System_printf("Prepare Callback %s %d\n", __FUNCTION__, __LINE__);
    return;
}

void beacon_bcast_advDoneCB(bStatus_t status)
{
    System_printf("Ad Done Callback %d %s %d\n", status, __FUNCTION__, __LINE__);
    return;
}

And this is the debug output:

BLE Address 54:fa:24:f2:f8:f0
uBLE Callback myPostEvtProxyCB 720
State Callback 1 beacon_bcast_stateChangeCB 726
uBLE Callback myPostEvtProxyCB 720
uBLE Callback myPostEvtProxyCB 720
State Callback 3 beacon_bcast_stateChangeCB 726

The last line is the last message I get out of the program. The state macro for 3 is UGAP_BCAST_STATE_ADVERTISING but I never see beacons come out. I tried copying parts of the Eddystone beacon example for the CC2640 but I got the same results. I can't find a good explanation for how uBLE actually works, just very sparse mentions and documentation for the API calls.

Questions:

  • Is there something special which needs to be set up in sysconfig?
  • Is there anything wrong with the data?
  • Hey Alex,

    I've assigned your post to an expert to comment on. Can you clarify what SDK version you are using?

  • Hi Alex,

    Thank you for bringing this to our attention. How are you verifying if advertisements are being sent out? Are you using a BLE traffic sniffer? If so, then could you attach the logs? I see that you have already found the Eddystone example for the CC2640, can you specify which pieces of the code you tried incorporating into your project? Would it be possible to export the project and provide it in a reply to this thread so that we can run the project as well? Are you running this program on a LaunchPad or on custom hardware?

    Best Regards,

    Jan

  •  SimpleLink SDK Version 5.10.0.48 (Current latest)

    I am using several methods to capture advertisements - nRF Connect on Android and hcitool, hcidump, and wireshark on Ubuntu. Unfortunately, as the problem states, there's nothing captured. I tried filtering by RSSI in a Faraday chamber, which works perfectly when I'm using the BLE 5 stack, but nothing shows up when I'm using uBLE. Similarly, I tried filtering by MAC (public, static MAC verified with BLE 5 stack) in case it was just a very weak signal and still got nothing. I don't have an SDR on hand that goes up to 2.4GHz or I would also verify with a spectrum analysis. If you still want me to post some logs, I can get you some with the filters removed, but they're just nearby test beacons and the occasional PC from next door.

    I tried copying over all of the functions and callbacks for Eddystone. I also compared my Sysconfig with both the Eddystone example and the RTLS example, but didn't find anything of significance. I have not tried using just the RTLS example without modification, but I don't have the launchpad display with buttons so I might not be able to do much with it.

    I have exported my project from CCS; hopefully you'll be able to pull it in and replicate. I've also included the last build in case it's easier to just load and trace. There are other code pieces which should all be excluded or ifdef'd out entirely. Let me know if I need to clean it up more.

    uBLE_20200712.zip

  • I also forgot to say - I'm using the Launchpad for the CC2652RB. I have also tried on multiple launchpads and custom hardware.

  • Hi Alex,

    Thank you for the detailed follow-up. I imported the project locally, but I am getting some errors and I am not able to build because of them. See below for a screenshot of the errors

    Would it be possible to remove these errors and re-send the project? Also, upon comparing the provided code I saw that in your project you attempt to change the advertising parameters before you start the broadcasting role while in the Eddystone example this is done afterwards. Can you try moving the setParameter function calls until after the ugap_bcastInit() call as a quick test?

    Best Regards,

    Jan

  • Thanks for getting back to me so quickly. Yes, I will clean up those project references and include paths later today. As a quick test, I also moved the ugap_bcastInit call and still didn't get broadcasts. 

        ...
        uble_registerAntSwitchCB(NULL);
    
        status = uble_stackInit(
                UBLE_ADDRTYPE_PUBLIC,   // Use the stored public address for testing
                NULL,                   // No static address to set
                myPostEvtProxyCB,       // Callback to process the message in this context
                RF_TIME_CRITICAL         // Don't do it; when you want to go do it
        );
        if(status != SUCCESS) {
            System_printf("uble_stackInit returned %d %s %d\n", status, __FUNCTION__, __LINE__);
            return;
        }
    
        status = ugap_bcastInit(&pCBs);
        if(status != SUCCESS) {
            System_printf("ugap_bcastInit returned %d %s %d\n", status, __FUNCTION__, __LINE__);
            return;
        }
    
        uble_setParameter(UBLE_PARAM_ADVINTERVAL, sizeof(uint16), &advInterval);
        ...

  • Hi Alex,

    It is no problem. Thank you for the quick test & for setting up the project to run on our machines. I look forward to your reply.

    Best Regards,

    Jan

  • I have attached a stripped down version of my workspace. I tested it standalone, but I may have missed something. It compiled and launched fine, so it's at least still building.

    uBLE_stripped_20200718.zip

  • Hi Alex,

    I was able to successfully build and flash the project you have provided. I will look into this and come back with an update as soon as possible. Thanks for putting in time to get this to compile on our end!

    Best Regards,

    Jan

  • Hi Alex,

    I am able to see the behavior you have specified. Upon looking through the code, it seems like there are several differences between the Eddystone beacon set up and your set up for the advertisement. I recommend trying to match the Eddystone beacon setup as closely as possible and to retest. I also recommend looking into the rtls_passive example as this as uBLE on the CC26X2 device. I will reach out to some colleagues to see their thoughts on this and get back to you. In the meantime, can you modify your set up and advertising to match what is done in the Eddystone and let us know if the behavior has changed at all?

    Best Regards,

    Jan

  • At least I'm not crazy (and my boards aren't somehow defective)!

    I'll try to dig more into the Eddystone example, but there is a lot that relies on the menu/screen. Most of the code looks like it's just switching between different beacon payloads or broadcast parameters at runtime.

    I will also try the RTLS example, unmodified, to see if I can get anything out of it. What is the screen to test with the Launchpad? Is it the BOOSTXL-SHARP128 or a different part? If this is a working example, then I can start from there. I'm just trying to get to a minimally working example to build off of, but it feels like I'm working backwards from example code to get there. 

  • Hi Alex,

    The output to all of these examples goes through UART to the PC. So you would simply need to open a Serial Monitor software such as PuTTY or Teraterm.

    Best Regards,

    Jan

  • I have built and loaded the rtls_passive example and still do not get anything broadcasting. I tried a few changes individually just for sanity checking, but still no luck. Based on the documentation here it looks like the only thing rtls_passive does is connection monitoring, not broadcasting.

    Next I will try porting more of the Eddystone beacon code, but when I tried this before it had no effect. It would be extremely helpful to have a more basic example of uBLE working with both TX and RX on this line of chips.

  • Hi Alex,

    Yes, you are correct. The rtls_passive example does not do any advertising, but it does make use of the uble stack. Which means we can use it to make sure that all of the uble specific setup that is required for the uble stack is being performed. It also serves as a sanity check to verify if the uble stack is working properly on your device. Can you verify if the rtls_passive example works as intended based on the documentation? I will do some further testing and come back with more information.

    Best Regards,

    Jan

  • If this example is supposed to emit any messages to the UART console (without a master and a slave device already communicating) then no, this example is not working. I stepped through some of the code and see where it has set up the connection monitor, but there's a lot of RTLS code in the way. It looks like it only configures the lines, but I don't see anywhere that it actually uses the UART. I will investigate further and add some sanity checking UART print statements, but I didn't get it working out of the box. 

  • Hi Alex,

    I ran a quick test with a logic analyzer and it seems that there is no activity in the RX and TX of the radio. The steps for how to do this are detailed in the Debugging RF Output section of the Debugging Guide. I will file a ticket and look into the source code a bit to see if I am able to find a root cause. In the meantime, can you try verifying if this issue is present on the 5.20 sdk? The 5.20 sdk has released recently. Understanding if this behavior is still observed in the newest SDK will be very helpful to further understand this problem.

    Best Regards,

    Jan

  • Thanks for this extra debugging guide! I got the same results when I added in the code to blink the onboard LEDs - Nothing at all.

    I tried upgrading to 5.20 and, while it's still not doing anything on the radio, it caused a new failure with the same code. Suddenly the call to uble_stackInit (tasks/main_task/main_task.c:392) was returning FAILURE. Stepping through the code it I found the reason for the failure was a failure to do an RFCOverrideSearch (SDK - rfc.c:161). I don't have much experience in on the RFC side, but the reason it was attempting to do this override was because I had previously made the call to RF_enableHPOSCTemperatureCompensation (syscfg/ti_drivers_conf.c:771). I was able to resolve the issue by commenting out this line in my sysconfig, but isn't temperature compensation pretty important for a stable radio signal? I'm not sure how much this helps; maybe a clue or maybe unrelated?

  • Hi Alex,

    That seems like it may be helpful. I will make sure to attach this added information to the ticket for the R&D team. After commenting out that line are you observing the same behavior you were observing in the 5.10 project (no RF activity)? Could you provide the new 5.20 project? Any piece of information could be very helpful to the R&D team.

    Best Regards,

    Jan

  • Yes, it is the same behavior with the new 5.20 SDK. I can modify the project I previously uploaded, but it's exactly the same except for the different SDK selected in CCS and that one commented out line. 

  • Hi Alex,

    Got it. Makes sense. Thanks for all of this info. I will share it with the R&D team and see if we can get some feedback from them. In the meantime, would it be possible to use the regular BLE5 stack in your application as a workaround? There is a broadcaster example present in the SDK that can be used to implement a beacon functionality.

    Best Regards,

    Jan

  • Yes, the regular BLE stack works just fine and is what we started with, but it is too large for our target application which will also contain the OpenThread stack. We are targeting fitting all of this, with OAD, in just the on-chip flash. It seems very doable, but we've run into multiple issues where the code hasn't quite caught up to the silicon. With just the TI RTOS and uBLE, we're seeing a compiled size of < 56k (-O3), which will be exceptional once it is fully working.

  • Hi Alex,

    Understood. I have shared all of this info with the R&D team and let you know whenever I have an update from them. In the meantime, if the goal is to reduce the flash consumption, then the information contained within the following E2E thread may be helpful: https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/880181/cc2642r-cc2652r-how-to-remove-pairing-capabilities-from-simple_peripheral-project

    I also suggest looking at the other E2E threads linked in the reply to that thread. Let me know if the information contained within those threads is helpful or not. If you need a significant amount of flash for your use case, then the CC2652R7 may be a viable candidate for your design. It has 152kB of RAM and 704kB of Flash.

    Best Regards,

    Jan

  • Is there a version of a CC2652RB with this expanded Flash/RAM in the pipeline? Hopefully we don't need a bigger/more expensive version, but it would be nice to have the option.

  • Hi Alex,

    I cannot publicly comment on the status of the pipeline or what future products may or may not offer. If you have an assigned TI representative, then they may be able to offer some insight.

    Best Regards,

    Jan

  • Has there been any update to this issue? I want to make sure it's being tracked to avoid further delays.

  • Hi Alex,

    The issue has been reported to R&D and has been added to the queue of issues to investigate. I have not received any further updates from them. Have you come across any additional information with this behavior? Any new piece of information can be helpful to R&D in getting to the bottom of this.

    Best Regards,

    Jan

  • You have exactly what I have - I run the example code and it doesn't work. I submitted a ticket to ask if we could contribute to the SDK and they forwarded me back to these forums. I feel helpless because we have nothing else to give you other than "it does not work as advertised." 

    Is there a date or timeline for getting this issue resolved? We're starting to reevaluate our platform's reliance on TI products. 

  • Hi Alex,

     I just migrated the uble_bcast_scan project into the cc13x2_26x2_sdk_5_10. Out of the box this project is advertising, but I also tested the scanning part. Please use this project and let us know if you run into any other issues.

    Please unzip it in:

    C:\ti\simplelink_cc13x2_26x2_sdk_5_10_00_xx\examples\rtos\CC26X2R1_LAUNCHXL\ble5stack

    And just import it as a regular project.

     Best regards,

      David

        uble_bcast_scan.zip

  • How did you verify this is advertising? I see on the terminal the number of advertisements it has sent, but nothing shows up on my scanners.

    I'm on SDK v5.20 and I just imported the project and ran it.

  • Hi Alex,

      I used a BLE sniffer:

    Also I used the TI's sensortag app. 

  • Would there be any reason this works differently on a CC2652RB? I'm not even getting the LEDs blinking for TX

  • Yes, there are some configurations (sysconfig) that are different, I believe I made all proper changes to the attached binary. At this moment, I do not have a CC2652RB LP with me, therefore I could not test it. Could you please give it a try and let me know it works on your side?

    uble_bcast_scan_RB_CC26X2R1_LAUNCHXL_tirtos_ccs.hex

  • There must be an issue or difference with the CC2652RB chip, then. I am getting the TX LED blinking every second, which lines up with the UART output, but I still can't see anything on my scanners. I also used the TI app just to verify and I got the same scan results as with the nRF Connect app and my computer's Wireshark scans. This behavior was verified on both the CC2652RB LP and our custom hardware.

  •   Have you had a chance to try this on a CC2652RB LP? I'm interested to see if you're experiencing the same behavior.

  • Hi Alex,

      Yes I did, I got the board earlier today and after some debugging, I noticed that there were some overrides missing in the urfc.c file (attached). I'm also attaching the binary that I used for testing.

    urfc.c
    /******************************************************************************
    
     @file  urfc.c
    
     @brief User configurable variables for the Micro BLE Stack Radio.
    
     Group: WCS, BTS
     Target Device: cc13x2_26x2
    
     ******************************************************************************
     
     Copyright (c) 2009-2021, Texas Instruments Incorporated
     All rights reserved.
    
     IMPORTANT: Your use of this Software is limited to those specific rights
     granted under the terms of a software license agreement between the user
     who downloaded the software, his/her employer (which must be your employer)
     and Texas Instruments Incorporated (the "License"). You may not use this
     Software unless you agree to abide by the terms of the License. The License
     limits your use, and you acknowledge, that the Software may not be modified,
     copied or distributed unless embedded on a Texas Instruments microcontroller
     or used solely and exclusively in conjunction with a Texas Instruments radio
     frequency transceiver, which is integrated into your product. Other than for
     the foregoing purpose, you may not use, reproduce, copy, prepare derivative
     works of, modify, distribute, perform, display or sell this Software and/or
     its documentation for any purpose.
    
     YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
     PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
     INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
     NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
     TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
     NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
     LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
     INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
     OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
     OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
     (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
    
     Should you have any questions regarding your right to use this Software,
     contact Texas Instruments Incorporated at www.TI.com.
    
     ******************************************************************************
     
     
     *****************************************************************************/
    
    /******************************************************************************
     * INCLUDES
     */
    
    #include "urfc.h"
    #include <ti_drivers_config.h>
    
    /******************************************************************************
     * MACROS
     */
    
    /******************************************************************************
     * CONSTANTS
     */
    
    // Tx Power
    #define UB_NUM_TX_POWER_VALUE (sizeof(ubTxPowerVal) / sizeof(ubTxPowerVal_t))
    
    // Default Tx Power Index
    #if defined(CC13X2P)
    #define DEFAULT_TX_POWER               9
    #else // !CC13X2
    #define DEFAULT_TX_POWER               7
    #endif // CC13X2
    
    /******************************************************************************
     * TYPEDEFS
     */
    
    /******************************************************************************
     * LOCAL VARIABLES
     */
    
    /******************************************************************************
     * GLOBAL VARIABLES
     */
    
    /* RF patch function pointers */
    const RF_Mode ubRfMode =
    {
      .rfMode      = RF_MODE_BLE,
    #if defined(CC26XX_R2) || defined(CC26X2)
      .cpePatchFxn = rf_patch_cpe_multi_protocol_rtls,
      .mcePatchFxn = 0,
      .rfePatchFxn = 0,
    #else /* !CC26XX_R2 */
      .cpePatchFxn = &rf_patch_cpe_ble,
      .mcePatchFxn = 0,
      .rfePatchFxn = &rf_patch_rfe_ble,
    #endif /* CC26XX_R2 */
    };
    
    // RF Override Registers
    // Note: Used with CMD_RADIO_SETUP; called at boot time and after wake.
    // Note: Must be in RAM as these overrides may need to be modified at runtime
    //       based on temperature compensation, although it is possible this may
    //       be automated in CM0 in PG2.0.
    #if defined(CC26XX)
      // CC26xx Normal Package with Flash Settings for 48 MHz device
      #if defined(CC26X2)
    
      #define  CTE_GENERIC_RX_ENABLE        (1)
      #define  CTE_USE_RFE_RAM              (4)
      #define  CTE_FLOW_CONTROL             (6)
    
      // Supported CTE for generic Rx and allow using RFE Ram for sampling
      #define CTECONFIG ((1 << CTE_GENERIC_RX_ENABLE) | (1 << CTE_USE_RFE_RAM) | 1 << CTE_FLOW_CONTROL)
      // 4 us before start of sampling
      #define CTEOFFSET (4)
      // 4 MHz sampling rate on 1 Mbps packets
      #define CTE_SAMPLING_CONFIG (4)
    
      #define NUM_ENTRIES  3
      #define SWITCH_TIME  2
    
      #define ANT1         (1<<28)
      #define ANT2         (1<<29)
      #define ANT3         (1<<30)
      #define IO_MASK      (ANT1 | ANT2 | ANT3)
    
      uint32_t antSwitching[] =
      {
        NUM_ENTRIES | (SWITCH_TIME << 8),
        IO_MASK,
        ANT1,
        ANT2,
        ANT3
      };
    
      regOverride_t pOverridesCommon[] = {
    
       // HPOSC frequency offset override, freqOffset=2^22*(F_nom-F_hposc)/F_hposc
        HPOSC_OVERRIDE(0),  //dl
    
        0x00158000, // S2RCFG: Capture S2R from FrontEnd, on event (CM0 will arm)
        0x000E51D0, // After FRAC
    
        // Synth: Set Fref to 6 MHz
        0x000884A3, //dl
        // HPOSC: Lower deviation by 5 kHz
        0x1EA3005B, //dl
    
        ((CTECONFIG << 16) | 0x8BB3), // Enable CTE capture
        ((CTEOFFSET << 24) | ((CTE_SAMPLING_CONFIG | (CTE_SAMPLING_CONFIG << 4)) << 16) | 0x0BC3), // Sampling rate, offset
        0xC0040341, // Pointer to antenna switching table in next entry
        (uint32_t) antSwitching, // Pointer to antenna switching table
         END_OVERRIDE };
    
       regOverride_t pOverrides1Mbps[] = {
         END_OVERRIDE };
    
       #if defined(BLE_V50_FEATURES) && (BLE_V50_FEATURES & (PHY_2MBPS_CFG | PHY_LR_CFG))
       regOverride_t pOverrides2Mbps[] = {
         END_OVERRIDE };
    
       regOverride_t pOverridesCoded[] = {
         END_OVERRIDE };
       #endif // PHY_2MBPS_CFG | PHY_LR_CFG
    
      #else // unknown device package
        #error "***BLE USER CONFIG BUILD ERROR*** Unknown package type!"
      #endif // <board>
    
    #elif defined(USE_FPGA)
      regOverride_t pOverridesCommon[] = {
      #if defined(CC26X2)
        // CC2642, as update by Helge on 12/12/17: Common Overrides for BLE5
        0x000151D0,
        0x00041110,
        0x00000083,
        0x00800403,
        0x80000303,
        0x02980243,
        0x01080263,
        0x08E90AA3,
        0x00068BA3,
        0x0E490C83,
        0x00005100, // Update matched filter for wired input
        0x721C5104, // Update matched filter for wired input
        0x00725108, // Update matched filter for wired input
        0x48f450d4, // Update matched filter gain for wired input
        END_OVERRIDE };
      #endif // CC26X2
    
      regOverride_t pOverrides1Mbps[] = {
        0x02405320,
        0x010302A3,
        END_OVERRIDE };
    
      #if defined(BLE_V50_FEATURES) && (BLE_V50_FEATURES & (PHY_2MBPS_CFG | PHY_LR_CFG))
      regOverride_t pOverrides2Mbps[] = {
        0x02405320,
        0x00B502A3,
        END_OVERRIDE };
    
      regOverride_t pOverridesCoded[] = {
        0x01013487,
        0x02405320,
        0x069802A3,
        END_OVERRIDE };
      #endif // PHY_2MBPS_CFG | PHY_LR_CFG
    
      #if defined(CC13X2P)
      // high gain PA overrides
      regOverride_t pOverridesTx20[] = {
        TX20_POWER_OVERRIDE(0x1234),
        0x01C20703, // Function of loDivider, frontEnd, and PA (High)
        END_OVERRIDE };
    
      // default PA overrides
      regOverride_t pOverridesTxStd[] = {
        TX_STD_POWER_OVERRIDE(0x1234),
        0x05320703, // Function loDivider, frontEnd, and PA (Default)
        END_OVERRIDE };
      #endif //CC13X2P
    
    
    #elif defined(CC13XX)
      #if defined(CC13X2)
      regOverride_t pOverridesCommon[] = {
        END_OVERRIDE };
    
      regOverride_t pOverrides1Mbps[] = {
        END_OVERRIDE };
    
      #if defined(BLE_V50_FEATURES) && (BLE_V50_FEATURES & (PHY_2MBPS_CFG | PHY_LR_CFG))
      regOverride_t pOverrides2Mbps[] = {
        END_OVERRIDE };
    
      regOverride_t pOverridesCoded[] = {
        END_OVERRIDE };
      #endif // PHY_2MBPS_CFG | PHY_LR_CFG
    
      #elif defined(CC13X2P)
      regOverride_t pOverridesCommon[] = {
        // List of hardware and configuration registers to override during common initialization of any Bluetooth 5 PHY format
        // Bluetooth 5: Reconfigure pilot tone length for high output power PA
        HW_REG_OVERRIDE(0x6024,0x4C20),
        // Bluetooth 5: Compensate for modified pilot tone length
        (uint32_t)0x01500263,
        END_OVERRIDE };
    
      regOverride_t pOverrides1Mbps[] = {
        // List of hardware and configuration registers to override when selecting Bluetooth 5, LE 1M PHY
        // Bluetooth 5: Reconfigure pilot tone length for high output power PA
        HW_REG_OVERRIDE(0x5320,0x05A0),
        // Bluetooth 5: Compensate for modified pilot tone length
        (uint32_t)0x017B02A3,
        END_OVERRIDE };
    
      #if defined(BLE_V50_FEATURES) && (BLE_V50_FEATURES & (PHY_2MBPS_CFG | PHY_LR_CFG))
      regOverride_t pOverrides2Mbps[] = {
        // List of hardware and configuration registers to override when selecting Bluetooth 5, LE 2M PHY
        // Bluetooth 5: Reconfigure pilot tone length for high output power PA
        HW_REG_OVERRIDE(0x5320,0x05A0),
        // Bluetooth 5: Compensate for modified pilot tone length
        (uint32_t)0x011902A3,
        END_OVERRIDE };
    
      regOverride_t pOverridesCoded[] = {
        // List of hardware and configuration registers to override when selecting Bluetooth 5, LE Coded PHY
        // Bluetooth 5: Reconfigure pilot tone length for high output power PA
        HW_REG_OVERRIDE(0x5320,0x05A0),
        // Bluetooth 5: Compensate for modified pilot tone length
        (uint32_t)0x07D102A3,
        END_OVERRIDE };
      #endif // PHY_2MBPS_CFG | PHY_LR_CFG
    
      // high gain PA overrides
      regOverride_t pOverridesTx20[] = {
        // The TX Power element should always be the first in the list
        TX20_POWER_OVERRIDE(0x003F5BB8),
        // The ANADIV radio parameter based on the LO divider (0) and front-end (0) settings
        (uint32_t)0x01C20703,
        END_OVERRIDE };
    
      // default PA overrides
      regOverride_t pOverridesTxStd[] = {
        // The TX Power element should always be the first in the list
        TX_STD_POWER_OVERRIDE(0x941E),
        // The ANADIV radio parameter based on the LO divider (0) and front-end (0) settings
        (uint32_t)0x05320703,
        END_OVERRIDE };
    
      #else // unknown board package
        #error "***BLE USER CONFIG BUILD ERROR*** Unknown board type!"
      #endif // <board>
    #else // unknown platform
      #error "ERROR: Unknown platform!"
    #endif // <board>
    
    //
    // Tx Power Table Used Depends on Device Package
    //
    const ubTxPowerVal_t ubTxPowerVal[] = {
    #if defined(USE_FPGA)
      // Differential Output (same as CC2650EM_7ID for now)
        { TX_POWER_MINUS_21_DBM, 0x06C7 },
        { TX_POWER_MINUS_18_DBM, 0x06C9 },
        { TX_POWER_MINUS_15_DBM, 0x0C88 },
        { TX_POWER_MINUS_12_DBM, 0x108A },
        { TX_POWER_MINUS_9_DBM,  0x0A8D },
        { TX_POWER_MINUS_6_DBM,  0x204D },
        { TX_POWER_MINUS_3_DBM,  0x2851 },
        { TX_POWER_0_DBM,        0x3459 },
        { TX_POWER_1_DBM,        0x385C },
        { TX_POWER_2_DBM,        0x440D },
        { TX_POWER_3_DBM,        0x5411 },
        { TX_POWER_4_DBM,        0x6C16 },
        { TX_POWER_5_DBM,        0x941E }
    #elif defined(CC26XX)
      #if defined(CC26X2)
      // Differential Output
        { TX_POWER_MINUS_21_DBM, 0x06C7 },
        { TX_POWER_MINUS_18_DBM, 0x06C9 },
        { TX_POWER_MINUS_15_DBM, 0x0C88 },
        { TX_POWER_MINUS_12_DBM, 0x108A },
        { TX_POWER_MINUS_9_DBM,  0x0A8D },
        { TX_POWER_MINUS_6_DBM,  0x204D },
        { TX_POWER_MINUS_3_DBM,  0x2851 },
        { TX_POWER_0_DBM,        0x3459 },
        { TX_POWER_1_DBM,        0x385C },
        { TX_POWER_2_DBM,        0x440D },
        { TX_POWER_3_DBM,        0x5411 },
        { TX_POWER_4_DBM,        0x6C16 },
        { TX_POWER_5_DBM,        0x941E }
      #else // unknown board package
        #error "***BLE USER CONFIG BUILD ERROR*** Unknown CC26x2 board type!"
      #endif // <board>
    #elif defined(CC13XX)
      #if defined(CC13X2)
      // Tx Power Values (Pout, Tx Power)
          { TX_POWER_MINUS_21_DBM, 0x06C7 },
          { TX_POWER_MINUS_18_DBM, 0x06C9 },
          { TX_POWER_MINUS_15_DBM, 0x0C88 },
          { TX_POWER_MINUS_12_DBM, 0x108A },
          { TX_POWER_MINUS_9_DBM,  0x0A8D },
          { TX_POWER_MINUS_6_DBM,  0x204D },
          { TX_POWER_MINUS_3_DBM,  0x2851 },
          { TX_POWER_0_DBM,        0x3459 },
          { TX_POWER_1_DBM,        0x385C },
          { TX_POWER_2_DBM,        0x440D },
          { TX_POWER_3_DBM,        0x5411 },
          { TX_POWER_4_DBM,        0x6C16 },
          { TX_POWER_5_DBM,        0x941E }
     #elif defined(CC13X2P)
     // Tx Power Values (Pout, Tx Power)
         {TX_POWER_MINUS_21_DBM, RF_TxPowerTable_DefaultPAEntry( 7, 3, 0,  3) },    // 0x000006C7
         {TX_POWER_MINUS_18_DBM, RF_TxPowerTable_DefaultPAEntry( 9, 3, 0,  3) },    // 0x000006C9
         {TX_POWER_MINUS_15_DBM, RF_TxPowerTable_DefaultPAEntry( 8, 2, 0,  6) },    // 0x00000C88
         {TX_POWER_MINUS_12_DBM, RF_TxPowerTable_DefaultPAEntry(10, 2, 0,  8) },    // 0x0000108A
         {TX_POWER_MINUS_10_DBM, RF_TxPowerTable_DefaultPAEntry(12, 2, 0, 11) },    // 0x0000168C
         {TX_POWER_MINUS_9_DBM,  RF_TxPowerTable_DefaultPAEntry(13, 2, 0,  5) },    // 0x00000A8D
         {TX_POWER_MINUS_6_DBM,  RF_TxPowerTable_DefaultPAEntry(13, 1, 0,  6) },    // 0x0000204D
         {TX_POWER_MINUS_5_DBM,  RF_TxPowerTable_DefaultPAEntry(14, 1, 0, 17) },    // 0x0000224E
         {TX_POWER_MINUS_3_DBM,  RF_TxPowerTable_DefaultPAEntry(17, 1, 0, 20) },    // 0x00002851
         {TX_POWER_0_DBM,        RF_TxPowerTable_DefaultPAEntry(25, 1, 0, 26) },    // 0x00003459
         {TX_POWER_1_DBM,        RF_TxPowerTable_DefaultPAEntry(28, 1, 0, 28) },    // 0x0000385C
         {TX_POWER_2_DBM,        RF_TxPowerTable_DefaultPAEntry(13, 0, 0, 34) },    // 0x0000440D
         {TX_POWER_3_DBM,        RF_TxPowerTable_DefaultPAEntry(17, 0, 0, 42) },    // 0x00005411
         {TX_POWER_4_DBM,        RF_TxPowerTable_DefaultPAEntry(22, 0, 0, 54) },    // 0x00006C16
         {TX_POWER_5_DBM,        RF_TxPowerTable_DefaultPAEntry(30, 0, 0, 74) },    // 0x0000941E
         {TX_POWER_6_DBM,        RF_TxPowerTable_HighPAEntry(46, 0, 1, 26,  7) },   // 0x8007352E
         {TX_POWER_9_DBM,        RF_TxPowerTable_HighPAEntry(40, 0, 1, 39, 41) },   // 0x80294F28
         {TX_POWER_10_DBM,       RF_TxPowerTable_HighPAEntry(23, 2, 1, 65,  5) },   // 0x80058397
         {TX_POWER_11_DBM,       RF_TxPowerTable_HighPAEntry(24, 2, 1, 29,  7) },   // 0x80073B98
         {TX_POWER_12_DBM,       RF_TxPowerTable_HighPAEntry(19, 2, 1, 16, 25) },   // 0x80192193
         {TX_POWER_13_DBM,       RF_TxPowerTable_HighPAEntry(27, 2, 1, 19, 13) },   // 0x800D279B
         {TX_POWER_14_DBM,       RF_TxPowerTable_HighPAEntry(24, 2, 1, 19, 27) },   // 0x801B2798
         {TX_POWER_15_DBM,       RF_TxPowerTable_HighPAEntry(23, 2, 1, 20, 39) },   // 0x80272997
         {TX_POWER_16_DBM,       RF_TxPowerTable_HighPAEntry(34, 2, 1, 26, 23) },   // 0x801735A2
         {TX_POWER_17_DBM,       RF_TxPowerTable_HighPAEntry(38, 2, 1, 33, 25) },   // 0x801943A6
         {TX_POWER_18_DBM,       RF_TxPowerTable_HighPAEntry(30, 2, 1, 37, 53) },   // 0x80354B9E
         {TX_POWER_19_DBM,       RF_TxPowerTable_HighPAEntry(36, 2, 1, 57, 59) },   // 0x803B73A4
         {TX_POWER_20_DBM,       RF_TxPowerTable_HighPAEntry(56, 2, 1, 45, 63) } }; // 0x803F5BB8
      #else // unknown board package
        #error "***BLE USER CONFIG BUILD ERROR*** Unknown CC135x board type!"
      #endif // <board>
    #else // unknown platform
      #error "ERROR: Unknown platform!"
    #endif // <board>
     };
    
    /* RF frontend mode bias */
    const uint8_t ubFeModeBias = RF_FE_MODE_AND_BIAS;
    
    /* Overrides for CMD_RADIO_SETUP */
    regOverride_t *ubRfRegOverride = pOverridesCommon;
    
    /* Tx Power Table */
    const ubTxPowerTable_t ubTxPowerTable = { ubTxPowerVal, UB_NUM_TX_POWER_VALUE };
    
    /*******************************************************************************
     */
    
     8053.uble_bcast_scan_RB_CC26X2R1_LAUNCHXL_tirtos_ccs.hex

      Best regards,

        David

  • Thanks, ! I'm now seeing an Eddystone beacon! Thank you so much for getting this to work.

    Could you also upload the whole project so we can have a golden sample?

  • Hi Alex,

      Please find attached the updated project.

        Best regards,

         David

    uble_bcast_scan_RB.zip