Dear Sir.
I have a question regarding the nRF9160 Interrupt procedure.
I have 2 interrupts on my nRF9160 custom board.
The 1st interrupt is an external interrupt every 2mSec.
Set up for the external interrupt :
void AFE4900_Interrupt_Config(void)
{
gpio_pin_configure(dev_io, GPIO_INT_PIN, GPIO_DIR_IN | GPIO_INT | GPIO_PUD_PULL_UP | GPIO_INT_EDGE);
gpio_init_callback(&gpio_cb, AFE4900_Interrupt, BIT(GPIO_INT_PIN));
gpio_add_callback(dev_io, &gpio_cb);
gpio_pin_enable_callback(dev_io, GPIO_INT_PIN);
}
The 2nd interrupt is 1 hz interrupt (timer interrupt configured by the CPU) :
k_timer_init(&my_timer, my_expiry_function, NULL);
k_timer_start(&my_timer, K_SECONDS(TIEMR_INTERVAL_SEC),K_SECONDS(TIEMR_INTERVAL_SEC));
What happens is that the 1hz timer has a high priority then the external interrupt ,
I measure in the scope and see that external interrupt is shifted by time when the 1hz interrupt occurs.
How can I set the external interrupt to have higher priority than the timer interrupt ?.