after a GAP etLE_Disconnection_Complete event we re-enable advertising with a call to GAP_LE_Advertising_Enable(). For the most part this seems to work, but about 5-10% of the time the call fails with HCI_DRIVER_ERROR (-14)
we "recover" by simply forcing a reset. Most of the time that works, but occasionally that subsequent restart also fails with stack initialization returning an HCI_INITIALIZATION_ERROR (-4).
I have to believe these two things are related.
We don't seem to experience any BT stack errors other than at these two times, which would appear to rule out basic issues with the HCI interface.
Can anybody provide any insight on what might be causing these occasional HCI errors ?
Peter