nRF51822QFAC SDK v10 S130
In the completed project it was necessary to make an update. It is necessary to switch off the softdevice and switch to its own Rx protocol. After performing the standard shutdown procedure, Radio interrupts stop coming. All other interrupts work. If do not initialise the stack, Radio works. As far as I understand correctly, Radio interrupts are not forwarded to the application table.
BLE_disable() run without errors. How fix the problem? Without preliminary BLE connection it is not possible to accept parameters of next connection protocol.
void BLE_disable(void) { int error; //Stopping advertising if (is_advertising_active) { error = sd_ble_gap_adv_stop(); APP_ERROR_CHECK(error); is_advertising_active = false; } //BLE_GAP_EVT_DISCONNECT should be waited for after the call. Disconnect if(connection_handle != BLE_CONN_HANDLE_INVALID) { // Disconnect error = sd_ble_gap_disconnect(connection_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION); if (error != NRF_SUCCESS && error != BLE_ERROR_INVALID_CONN_HANDLE) { APP_ERROR_CHECK(error); } // Waiting for the disconnect event BLE_GAP_EVT_DISCONNECT for(int i = 0; i < 10; i++) { if(BLE_connected == false) break; // waiting for the tripping event to be triggered nrf_delay_ms(10); } } //forward interrupt vectors to the application (it don`t help) //error = sd_softdevice_vector_table_base_set(0x1C000); //APP_ERROR_CHECK(error); //Deactivating SoftDevice error = softdevice_handler_sd_disable(); APP_ERROR_CHECK(error); SoftDev_enabled = softdevice_handler_isEnabled(); }
//-----------
Debug here. If comment BLE_Peripheral_ini() the reception will work.
But if you switch the stack on and then switch it off, it's over.
//Bluetooth radio ini BLE_Peripheral_ini(); sleep(100); BLE_disable(); RADIO_RxCustom_Ini();