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

HardFault softdevice_handler_init

Using SD_110 v6 I get a hardfault on the final call to sd_nvic_EnableIRQ(SWI2_IRQn); sd_softdevice_enable before that returns success. Any idea why enabling interrupt could cause hardfault?

int main(void)
{
	
	NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
	NRF_CLOCK->TASKS_HFCLKSTART = 1;
	while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0) {};
	NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
	
	 //uint32_t err_code;

    // Initialize the SoftDevice handler module.
    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM, false);
}
Related