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: CC2640R2F BLE APPLICATION

Part Number: CC2640R2F

Hello Guys,

when i am running my application on launchpad it is working fine , advertising , making bonded connection with my apk and all . But when i am running same application on my custom board it's not working for me , it advertise ,even sometime i am able to connect with mobile apk but after sometime it is getting disconnected.  I don't know how to proceed ahead .

i am using 32khz crystal less settings and project zero as my base . 

  • Hi Mohit,

    Provide more details about your custom board. Also what modifications have you made to Simple Peripheral for it to work on your custom board.

    -kel

  • Try to refer to https://www.ti.com/lit/an/swra495h/swra495h.pdf to check if your 24M crystal is accurate enough.

  • Hi Mohit,

    Similar to what Markel and Yikai are saying, I would recommend checking the app note and sharing your schematic/layout for better help. We have a list of recommended crystals here. I'd recommend using one of those listed for your device or a crystal with similar parameters.

    Best,

    Nate

  • Hello Markel,

    We are using custom board design by melange systems using cc2640r2f and we have  yxc 24.000 ti crystal oscillator on board . No modifications makes so far in project zero except some custom uuid and descriptors.

  • First, I would recommend trying the custom board with no modifications made to project zero just so we can ensure it's a hardware problem. If that still fails, we'd need to dig into your schematic/layout/component selection.

    Can you share your schematic/layout and do you have a more detailed description of your crystal? When I look for it online, there are multiple versions with different capacitances and frequency tolerances, none of which seem to be close to the 5-7 pF of capacitance that our recommended crystals are specified to.

  • Nathan, I cross check my custom board with our custom board supplier hex file . it is working fine for us, we are advertising and able to make bonded connection , there is no issue with that . But when i upload project zero with no modifications it is not working .

    Sorry , we cannot share schematic/layout/component selection of our custom board as we don't have it with us .

  • Nathan , i think i am missing some configuration to to have a bonded connection , Bcz after advertising my device connected with my APk for 10-12 secs then it will be disconnected .

  • No, this is not the way to bring up a custom board. First make sure your custom board Bluetooth is working, by modifying the simple peripheral to work for your custom board. Do this below.

    1. Configure simple peripheral for 32Khz crystal-less.

    2. Make sure you set the correct define for RF Front End Configuration at CC2640R2_LAUNCHXL.h

    3. Comment out the PIN IO configuration at BoardGpioInitTable[] at CC2640R2_LAUNCHXL.c like this below

    const PIN_Config BoardGpioInitTable[] = {
    
        //CC2640R2_LAUNCHXL_PIN_RLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,       /* LED initially off */
        //CC2640R2_LAUNCHXL_PIN_GLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,       /* LED initially off */
        //CC2640R2_LAUNCHXL_PIN_BTN1 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS,          /* Button is active low */
        //CC2640R2_LAUNCHXL_PIN_BTN2 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS,          /* Button is active low */
        //CC2640R2_LAUNCHXL_SPI_FLASH_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MIN,  /* External flash chip select */
        //CC2640R2_LAUNCHXL_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN,                                              /* UART RX via debugger back channel */
        //CC2640R2_LAUNCHXL_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,                         /* UART TX via debugger back channel */
        //CC2640R2_LAUNCHXL_SPI0_MOSI | PIN_INPUT_EN | PIN_PULLDOWN,                                            /* SPI master out - slave in */
        //CC2640R2_LAUNCHXL_SPI0_MISO | PIN_INPUT_EN | PIN_PULLDOWN,                                            /* SPI master in - slave out */
        //CC2640R2_LAUNCHXL_SPI0_CLK | PIN_INPUT_EN | PIN_PULLDOWN,                                             /* SPI clock */
    
        PIN_TERMINATE
    };

    4, Comment out the Board_initHook() at CC2640R2_LAUNCHXL_initGeneral() at CC2640R2_LAUNCHXL.c. This will cause a hang.

    void CC2640R2_LAUNCHXL_initGeneral(void)
    {
        Power_init();
    
        if (PIN_init(BoardGpioInitTable) != PIN_SUCCESS) {
            /* Error with PIN_init */
            while (1);
        }
    
        /* Perform board-specific initialization */
        //Board_initHook();
    }

    5. Rebuild all make sure there are no warnings or errors. You can enable hex file generation and flash the hex file using SmartRF Flash Programmer 2.

    6. CCS Debug and see if your are able to debug step past SimplePeripheral_init().

    7. Test Simple Peripheral Bluetooth Connection. If this works then Bluetooth works at your custom board.

    If you did all of the above and there is no Bluetooth Connection then you have a hardware problem

    -kel