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启动扫描时死机

Other Parts Discussed in Thread: CC2640R2F

Hi All

我在项目中使用cc2640r2f时碰到一个问题:在某些地点,循环启动蓝牙扫描就会死机。项目是在ble5_simple_observer_cc2640r2lp_app,蓝牙栈simplelink_cc2640r2_sdk_1_40_00_45的版本上修改的,程序的功能就是扫描周围的ble蓝牙设备,收集MAC信息,硬件用的是阿莫的开发板

参数设置的部分代码如下,4s周期,最大数量20个:

测试的环境如下图,是在一个供电所边上,供电所里面还有个天线,不知道是什么天线,在红圈的地点,一分钟之内就会死机。。。

非常感谢大家的阅读,如果您能提供一些建议,不胜感激^_^
  • 图被吞了。。。这是蓝牙参数初始化的code
    // ******************************************************************
    // NO STACK API CALLS CAN OCCUR BEFORE THIS CALL TO ICall_registerApp
    // ******************************************************************
    // Register the current thread as an ICall dispatcher application
    // so that the application can send and receive messages.
    ICall_registerApp(&selfEntity, &syncEvent);

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

    // Create one-shot clocks for internal periodic events.
    Util_constructClock(&timerClock, SimpleBLEPeripheral_clockHandler,
    SBP_TIMER_EVT_PERIOD, 0, false, SBP_TIMER_EVT);

    Util_constructClock(&Uart485timerClock, SimpleBLEPeripheral_clockHandler,
    SBP_UART485_EVT_PERIOD, 0, false, SBP_UART485_EVT);

    Util_constructClock(&LedtimerClock, SimpleBLEPeripheral_clockHandler,
    SBP_LED_EVT_PERIOD, SBP_LED_EVT_PERIOD, true, SBP_LED_EVT);

    // Setup Observer Profile
    {
    uint8 scanRes = DEFAULT_MAX_SCAN_RES;
    GAPObserverRole_SetParameter(GAPOBSERVERROLE_MAX_SCAN_RES, sizeof(uint8_t),
    &scanRes );
    }

    // Setup GAP
    GAP_SetParamValue(TGAP_GEN_DISC_SCAN, DEFAULT_SCAN_DURATION);
    GAP_SetParamValue(TGAP_LIM_DISC_SCAN, DEFAULT_SCAN_DURATION);

    // Start the Device
    VOID GAPObserverRole_StartDevice((gapObserverRoleCB_t *)&simpleBLERoleCB);

    给我的感觉就是RF串进来了电磁干扰,把cortex m0给干趴了。。。有看门狗,但是没重启
  • 1、这个协议栈版本太旧了,建议用新版的例程测试一下
    2、先不要修改,直接用例程跑一下看看,仅凭描述难以判断是软件还是环境的问题
  • 这个问题解决了吗?用的什么版本的。
  • 把程序文件移植到iar上,就不出现死机的现象了,不确定是什么原因,可能ccs和iar在蓝牙核配置上有细微的差别。。。