Tool/software: TI-RTOS
The compiler: TI v16.9.2.LTS
RTOS: 2_20_01_08
BLE stack: 2_02_01_18
Stack is configured to run as PERIPHERAL + OBSERVER
After running for an indeterminate amount of time, the application receives a GAPROLE_ERROR status change from my peripheral_observer profile.
In the debugger, the GAPROLE_ERROR is coming from the profile asking the GAP:
if (GAP_MakeDiscoverable(selfEntity, ¶ms) != SUCCESS)
Basically, when GAP_MakeDiscoverable is called, the system tries to formulate an ICall call to the GAP service, but the service is terminated.
So:
1) How does RTOS tell you when something terminated so you can catch it?
2) Can I restart the GAP or should I just reboot the device?
3) As far as I can tell, I have plenty of overhead on all my task stacks and heaps and whatnot, no errors are visible in the RTOS viewer, no stack overruns etc. All the memory alloc/dealloc looks to be balanced, whenever a device discovery event occurs I copy the information to a new message for my event loop. I switch off advertising when I am doing device discovery.
Really unsure how to proceed here.