Part Number:CC2340R5
据我所知,调用ble相关的接口吗,需要在此线程注册ICall_registerApp(&selfEntity, &syncEvent)接口;
目前我的项目中有两个线程会调用BLE相关接口,所以我在两个线程的前面都调用了ICall_registerApp(&selfEntity, &syncEvent);,然后出现崩溃了;
如果只有一个线程调用ICall_registerApp(&selfEntity, &syncEvent);则运行正常
john xin:
这是我的代码,帮忙看下是什么原因 }
// Entity ID globally used to check for source and/or destination of messages static ICall_EntityID selfEntity1;// Event globally used to post local events and pend on system and // local events. static ICall_SyncHandle syncEvent1;// Entity ID globally used to check for source and/or destination of messages static ICall_EntityID selfEntity2;// Event globally used to post local events and pend on system and // local events. static ICall_SyncHandle syncEvent2;void protocol_os_send_proc(void *arg) {ICall_registerApp(&selfEntity1, &syncEvent1);while (1){protocol_send_process();}}void protocol_os_send_proc(void *arg) {ICall_registerApp(&selfEntity2, &syncEvent2);while (1){protocol_send_process();} }
,
Alex Zhang:
您好,已经跟进您的问题
,
Alex Zhang:
您好,我这边为您这边提供了注册任务的例程讲解,希望可以帮助到您。
https://dev.ti.com/tirex/explore/content/simplelink_lowpower_f3_sdk_7_20_01_10/docs/ble5stack/ble_user_guide/html/freertos/tasks.html?highlight=icall_registerapp#null
https://dev.ti.com/tirex/explore/content/simplelink_lowpower_f3_sdk_7_20_01_10/docs/ble5stack/ble_user_guide/html/ble-stack-5.x/the-application-cc23xx.html?highlight=icall_registerapp#icall-stack|-protocol-service