工具与软件:
您好!
环境:
| 硬件 | LP-EM-CC2340R5 |
| 代码编写器 | 12.7.1.00001 |
| SDK |
开启时出现相同现象 SIMPLELINK-LOWPOWER-F3-SDK 7.40.00.64 8.10.00.55 |
我正在使用 CC2340进行 MCU (UART 已连接)和手机之间的通信。
最大消息大小约为2058字节。
作为标题,在通知时 CC2340可能会运行到 iCall_abort ()。
我通过修改数据流简化了问题示例:
1.用户连接到数据流并请求 MTU 517
2.在用户写入回声特性时,CC2340开始每秒通知2058个字节。 但即使将周期延长至2秒、也会发生相同的问题。
3.在200~400 μ s 通知后,CC2340运行到 iCall_abort ()中,调用 stack : 
PDU 配置: 
连接参数: 
当然,响应反大小写字符的原始示例代码被调用 start_tx_test()以开始通知测试所取代。
主函数如下所示:
#define TX_LEN_ (2058)static uint8_t tx_data[TX_LEN_];static sem_t sem_start_tx;static sem_t sem_tx_done;void start_tx_test(){ sem_post(&sem_start_tx);}static void VNG_UART_to_BLE(char *pData){ DSP_sendData(tx_data, TX_LEN_); sem_post(&sem_tx_done);}static void *UART_tx_Thread(void *arg0){ sem_wait(&sem_start_tx); uint8_t cnt = 0; while(1) { memset(tx_data, cnt, TX_LEN_); if(BLEAppUtil_invokeFunctionNoData(VNG_UART_to_BLE) != SUCCESS) { while(1){} } sem_wait(&sem_tx_done); cnt += 1; vTaskDelay(pdMS_TO_TICKS(1000)); }}void start_thread(){ if(sem_init(&sem_start_tx, 0, 0)) { while(1){} } if(sem_init(&sem_tx_done, 0, 0)) { while(1){} } pthread_t thread; pthread_attr_t attrs; struct sched_param priParam; int retc; /* Initialize the attributes structure with default values */ pthread_attr_init(&attrs); /* Set priority, detach state, and stack size attributes */ priParam.sched_priority = 1; retc = pthread_attr_setschedparam(&attrs, &priParam); retc |= pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED); retc |= pthread_attr_setstacksize(&attrs, 1024); if (retc != 0) { /* failed to set attributes */ while (1) {} } retc = pthread_create(&thread, &attrs, UART_tx_Thread, NULL); if (retc != 0) { /* pthread_create() failed */ while (1) {} }}
有人可以告诉我为什么 iCall_abort ()会被触发只是为了连续通知吗?
非常感谢
春民



