This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Hardcoded IRQ priority on GPIOTE library

Hi, I'm using the GPIOTE library to detect an interrupt from a sensor, query the sensor and update the gatts value. The problem I've found is that the IRQ priority is hardcoded on app_gpiote_init to APP_IRQ_PRIORITY_HIGH so this prevents me to use the event handler to directly update the gatts value, just because the interrupt priority level is higher than the SVC. A workaround is to queue an event to the scheduler, but I think it's an unnecessary overhead.

So my question is, there's any reason for hardcoding the IRQ priority to high? As I can see nrf_drv_gpiote uses the GPIOTE_CONFIG_IRQ_PRIORITY macro defined on nrf_drv_config.h instead, which IMHO is a better solution.

As a side note, I'm using the NRF52 SDK, but it is the same on the NRF51 SDK.

Thanks

Related