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.

CC2640R2 运行官方提供的ble5_simple_peripheral,一段时间后从机无广播

Other Parts Discussed in Thread: CC2640R2F

项目信息:

CCS910

SDK: simplelink_cc2640r2_sdk_3_40_00_10

从机运行的fimware:ble5_simple_peripheral

硬件板子: TI LaunchPad, 芯片是CC2640R2F

现象描述1:

四块开发板同时运行ble_5simple_perpheral程序,运行一段时间后从机无广播,并且主机scan不到从机。从设备供电电源连上示波器观察,没有正常的脉冲信号产生(正常广播会以一定的频率产生脉冲信号)。

目前在TI提供的ble_5simple_perpheral 只做了以下修改并且关闭了POWER_SAVE。

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
};

现象描述2:

在TI提供的example (ble_5simple_perpheral)添加了一个周期时钟,每隔100毫秒去检测一次状态。

当从机运行一段时间后停止了广播,并且在周期时钟里面调用函数 uint8_t numActive = linkDB_NumActive(); 返回值是1.

uint8_t test_flag = 0;
static void SimplePeripheral_performMonitorTask(void)
{

    uint8_t numActive = linkDB_NumActive();
    if(numActive == 1)
    {
        ZHOU_SetIOValue(USER_OUTPUT_10,1);
    }
    else
    {
        ZHOU_SetIOValue(USER_OUTPUT_10,0);
    }

    if(test_flag == 0)
    {
        ZHOU_SetIOValue(USER_OUTPUT_9,1);
        test_flag = 1;
    }
    else
    {
        ZHOU_SetIOValue(USER_OUTPUT_9,0);
        test_flag = 0;
    }

}