This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE is not working on PCA10003 EK (nRF51422 based device)

Along with S110 BLE stack I programmed my application, which I managed to do without any conflict. My application is not working properly and neither control is transfered to the main() function.

Kindly help me with details how to initiate my application so can mange to run my application along with the Soft Devices.

int main(void) {

/* Enable Softdevice (including sd_ble before framework */
	softdevice_setup();
	gpio_init();
	TICK_PIN(LED_0);  //@check_point
           sd_nvic_EnableIRQ(SD_EVT_IRQn);   
      nrf_adv_conn_init(); //@check_point
   	     TICK_PIN(LED_1);
while (true)
{
			TICK_PIN(LED_0);
    sd_app_evt_wait();
}

}

so the control is not passing to it.

here what code part I included for soft_device enable

static __INLINE void softdevice_setup(void) { printf("+softdevice_setup\n");

uint32_t err_code; 
	err_code = sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_XTAL_75_PPM, 
                                         softdevice_assert_callback);
APP_ERROR_CHECK(err_code);
	 
 err_code = sd_nvic_SetPriority(SD_EVT_IRQn, NRF_APP_PRIORITY_LOW); 
APP_ERROR_CHECK(err_code);
err_code = sd_nvic_EnableIRQ(SD_EVT_IRQn);      
APP_ERROR_CHECK(err_code);
	ble_enable_params_t ble_enable_params;
ble_enable_params.gatts_enable_params.service_changed = 0;    
uint32_t error_code = sd_ble_enable(&ble_enable_params);
APP_ERROR_CHECK(error_code);
	//Soft_dev_I2_IRQHandler();

}

how to Configure application-specific interrupts. Set application IRQ to lowest priority and enable ?? (Ble Stack)

Related