微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > CC2541被iphone5s连接后,烧机控制写flash,1个多小时后会再也连不上设备。

CC2541被iphone5s连接后,烧机控制写flash,1个多小时后会再也连不上设备。

时间:10-02 整理:3721RD 点击:

修改示例代码simplePeriphel中的performPeriodicTask函数写flash,每隔1s触发一次:如下

static void performPeriodicTask( void ) {

。。。。

uint8 rgbValue[4]={0};
rgbValue[0] = gRed;
rgbValue[1] = gGreen;
rgbValue[2] = gBlue;
rgbValue[3] = gAlpha;
ret1 = osal_snv_write(0x80, 4, (uint8*)&rgbValue[0]);

。。。。。

。。。。。

}

iphone连接不上的错误提示是CBErrorDomain。

1、note:the NV memory function is  called and operated may take several milliseconds to complete, in addition,interrupts may be disabled for several milliseconds.It is best to execute these functions at times when they do not conflict with other timing-critical operations. and you operate the functions so frequently, maybe it  destroy the work of ble protocol

2、maybe there are other reasons ,and I hope the note can inspires you to do something ,may you luck! and please share your way if you find a solution or an answer to it.thank you!

mark, 你好, 我之前也测试过在写之前将EA置为0, 写之后将EA置为1来屏蔽其它所有中断,仍然会存在这个问题。

请问对于什么时候写flash对BLE流程影响小,您有什么好建议呢?

一般在未连接时操作会好些

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top