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: 使用CCS导入一个BLE5-stack例程simple_central,调用GapScan_enable(0, DEFAULT_SCAN_DURATION, 0)后程序死掉

Part Number: CC2640R2F

如题,SDK版本是SimpleLink CC2640R2 SDK - 4.30.00.08.

我在程序中添加了看门狗,发现调用GapScan_enable后过一段时间程序就复位了。

可以确定硬件是没有问题的,我有一个老的工程SDK版本是simplelink_cc2640r2_sdk_1_40_00_45工作正常。

我初始化了串口,通过串口接收一个指令后调用SimpleCentral_doDiscoverDevices开始扫描,程序执行到GapScan_enable就死了

我已经附上了代码。simple_central.csimple_central.h

SerialInterface.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/***********************************************************************//**
* @file SerialInterface.c
* @brief
* @details
* @author Nick ( Nick.yao@justec.cn )
* @version
* @date 2023-02-23 14:08:25
* @pre
* @copyright Copyright <span style="font-family:Microsoft Sans Serif;">&copy; </span>Nick ( Nick.yao@justec.cn ). All rights reserved.
*/
#include "SerialInterface.h"
#include "Att.h"
//#include "Protocol.h"
//#include "Crc.h"
//#include "peripheral.h"
//#include "devinfoservice.h"
//#include "simpleGATTprofile.h"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
SerialInterface.h