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

S130 Fatal Error after PPI initialization

When I initialize PPI after timer1 has been initialized I get a fatal error (and reset). Code:

const nrf_drv_timer_t timer1 = NRF_DRV_TIMER_INSTANCE(1);
nrf_ppi_channel_t ppi_channel1;
static void timers_init() {
	nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;
	timer_cfg.mode = NRF_TIMER_MODE_COUNTER;
	timer_cfg.frequency = NRF_TIMER_FREQ_125kHz;
	NRF_LOG_INFO("Timer init\r\n");
	APP_ERROR_CHECK(nrf_drv_timer_init(&timer1, &timer_cfg, timer_event_handler));
	nrf_drv_timer_extended_compare(&timer1, NRF_TIMER_CC_CHANNEL1, 125, NRF_TIMER_SHORT_COMPARE1_CLEAR_MASK, false);

	NRF_LOG_INFO("PPI init\r\n");
	APP_ERROR_CHECK(nrf_drv_ppi_init());
	NRF_LOG_INFO("PPI alloc\r\n");
	APP_ERROR_CHECK(nrf_drv_ppi_channel_alloc(&ppi_channel1));
	NRF_LOG_INFO("PPI assign\r\n");
	APP_ERROR_CHECK(nrf_drv_ppi_channel_assign(ppi_channel1, nrf_drv_timer_event_address_get(&timer1, NRF_TIMER_EVENT_COMPARE1), nrf_adc_task_address_get(NRF_ADC_TASK_START)));
	NRF_LOG_INFO("PPI enable\r\n");
	APP_ERROR_CHECK(nrf_drv_ppi_channel_enable(ppi_channel1));
}

The console looks like this:

Timer init PPI init APP_ERROR:ERROR:Fatal and then it resets. Are there limitations with using ppi on a softdevice?

Related