Issue setting up timer

Hey, I'm trying to set up a simple timer that fires an interrupt every so often (100-200ms), but I'm having trouble. My interrupt keeps firing continuously, but I think I'm clearing the compare event.

Here is my code: 

int main() 
{
    nrf_timer_mode_set(NRF_TIMER4, NRF_TIMER_MODE_TIMER);
    nrf_timer_bit_width_set(NRF_TIMER4, NRF_TIMER_BIT_WIDTH_32);
    nrf_timer_frequency_set(NRF_TIMER4, NRF_TIMER_FREQ_1MHz);
    nrf_timer_cc_write(NRF_TIMER4, NRF_TIMER_CC_CHANNEL1,
                 1000000);
    nrf_timer_int_enable(NRF_TIMER4, NRF_TIMER_INT_COMPARE1_MASK);
    nrf_timer_task_trigger(NRF_TIMER4, NRF_TIMER_TASK_START);
    
    // Enable timer IRQ
    NVIC_SetPriority(NRF_TIMER4_IRQn, 7);
    NVIC_EnableIRQ(NRF_TIMER4_IRQn);
}

void TIMER4_IRQHandler(void)
{
  if (nrf_timer_event_check(NRF_TIMER4, NRF_TIMER_EVENT_COMPARE1)) {
	nrf_timer_event_clear(NRF_TIMER4, NRF_TIMER_EVENT_COMPARE1);
	leds_invert(2);
  }
}

Related