I am using NRF9160 with the Nordic SDK 2.3.0, on the NRF9160DK.
I have a 10 ms HW timer interrupt, and it is meant to wake up a thread each 10 ms. The issue is that the latency between the ISR and the thread waking-up has excessive variance: randomly between 0.3 and 1.5 ms most of the time, and up to 4 ms.
I am setting up the timer via NRFX, using IRQ_DIRECT_CONNECT. I have validated that it occurs each 10ms with negligible variance.
In order to make an isolated test condition, I have removed all the threads and known interrupts sources apart from the hw-timer and the kernel, and I am not initializing the modem. Here is a logic analyzer plot of the thread unblocking vs. time. The pulses should be all very close to 10ms, but there is remarkable variance.

The latency is so bad that I think there must be something wrong with the board, but we have tried multiple boards. I don't know if the problem is Zephyr itself, or if there is some unexpected IRQ that is blocking the kernel (I am using a configuration taken from the default configuration of the nrf9160), or if it's something else. Please let me know if you have any clues or ideas, thank you.