Part Number: SIMPLELINK-CC26X2-SDK
Using the CC2642R on custom boards, SDK version 2.10.00 (I'm aware this isn't the latest), application based on BLE5 Simple Peripheral. I'm finding that if I call
GapAdv_enable(advHandleLegacy, GAP_ADV_ENABLE_OPTIONS_USE_DURATION , DEFAULT_ADVERTISING_DURATION);
and connect to the device while it is discoverable, the device will disconnect when DEFAULT_ADVERTISING_DURATION ends, and further calls to enable advertising are unsuccessful. I have tried this with a couple different values (3000 and 4500 for 30s and 45s respectively) and have observed that the point of disconnection moves accordingly.
If I don't connect, the device stops advertising at the expected time, and another call to GapAdv_enable() begins another advertising period as expected. But if I connect, the connection will work fine until exactly when the advertising duration timer would expire, and then my central that's connected to it reports a connection timeout error, and I can't reconnect or restart advertising without resetting the processor.