High accuracy GPIO interrupts in NCS possible?

In the old Nordic SDK we had the option of using "high accuracy" interrupts with GPIOTE by using something like NRFX_GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);

Is there a similar option for NCS? I am asking because in my specific use case I measure ~160us from interrupt to handler with the old SDK and ~450us with NCS and I would like to improve that.

CONFIG_ZERO_LATENCY_IRQS is on and i configure my interrupts like this:

gpio_pin_configure_dt(&conf.gpio_irq, GPIO_INPUT);
gpio_init_callback(&gpio_cb, dw3000_hw_isr, BIT(conf.gpio_irq.pin));
gpio_add_callback(conf.gpio_irq.port, &gpio_cb);
gpio_pin_interrupt_configure_dt(&conf.gpio_irq, GPIO_INT_EDGE_RISING);

Thank you

Parents
  • Hi,

    Is there a similar option for NCS? I am asking because in my specific use case I measure ~160us from interrupt to handler with the old SDK and ~450us with NCS and I would like to improve that.

    Do you see a similar delay with a simple sample to test interrupts? Just would be interresting to see if other parts of the code will impact this.

    One option is to use nrfx drivers directly instead of the Zephyr GPIO drivers, as seen in the nrfx sample. Perhaps removing some layers of abstractions will make it go faster?

    Regards,
    Sigurd Hellesvik

  • I must admit that other things are also involved (such as SPI read, scheduling work) which might slow down the process. My question was primarily whether this "high accuracy" option is now obsolete, always on or always off when using Zephyr GPIO?

    I will later make some tests to measure IRQ speed directly using your example.

Reply Children
No Data
Related