Our application is based on the sample application simple_peripheral for SDk verison 2_20. We wish to permanently terminate advertising after a user specified period of time (to restore advertising would require a reset of the controller via a power cycle). I have probed the use of GAPROLE_ADVERT_ENABLE, which eventually can call the function GAP_EndDiscoverable(selfEntity). When I have tried to make use of this, the BLE stack crashes. I assume perhaps I am violating some context requirement for making the call. My search of the forums and documentation for the proper way to accomplish this have been unsuccessful. Any pointers to example code, or documentation would be greatly appreciated. Thank you.