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.

BLE延时问题,CC2540.

Other Parts Discussed in Thread: CC2540, ADS1191

首先执行数据采集函数(cc2540采集ADS1191):

void caiji(void)
{
led=1;
uint i=0;
SPI_Write(0x12);
for (i=0;i<10;i=i+2)
{
SPI_Write(0x12);

while(DRDY);
led=1;
data_read1=SPI_Read();
data_read2=SPI_Read();
TxData[i]=SPI_Read();
TxData[i+1]=SPI_Read();
delayms(180);
led=0;

}
}

打算用以下函数把数据发送给手机:

SimpleProfile_SetParameter( SIMPLEPROFILE_CHAR4, 10, TxData);

然而如果直接发送:采集数据的函数有一个while(DRDY);和一个延时函数delayms(180);BLE模块和手机就会断开,去掉这两个占用时间比较长的函数连接正常也能发送数据,手机正常接收,但是采集的数据就不正确了,

我想问的是:怎么解决延时过长断开的问题?

我试着修改了#define GAPROLE_TIMEOUT_MULTIPLIER  0x314这一句,然而并没有解决问题。求助。