I am working with the cc26x2 sdk using the multi-role example on the CC2652R Launchpad. In this sample code you can press a button on the launch pad to initiate a device discovery and then connect to a device to read its characteristics.
I am trying to add RS232 communications to trigger this scanning process but for some reason it crashes the application.
I have added a second uart to the application and can send commands over this Uart. One I send the start scan command, the application generates an event that gets processed in the
multi_role_processAppMsg()
function in the same way the hardware key button presses are processed. But When my even calls the
multi_role_doDiscoverDevices
the application crashes. I have traced it down to the GapScan_enable() call and within this call it seems to crash when it called
icall_directAPI at this function
ICall_sendServiceMsg(ICall_getEntityId(), service, ICALL_MSG_FORMAT_DIRECT_API_ID, &(liteMsg.msg));
Since I am calling multi_role_doDiscoverDevices from within the application thread I do not understand why its crashing. Can anyone shed some light onto this?