Looks like there is an error in the nrf_drv_gpiote_common.h
:
#define INTERRUPT_PRIORITY_VALIDATION(pri) STATIC_ASSERT(((pri > 2) && (pri < 4)) || ((pri > 5) && (pri < 8)))
It should be pri >= 2
instead of pri > 2
.
Looks like there is an error in the nrf_drv_gpiote_common.h
:
#define INTERRUPT_PRIORITY_VALIDATION(pri) STATIC_ASSERT(((pri > 2) && (pri < 4)) || ((pri > 5) && (pri < 8)))
It should be pri >= 2
instead of pri > 2
.
Thanks for letting us know. I confirm that this is a bug and the correct macro should have been like below
#define INTERRUPT_PRIORITY_VALIDATION(pri) STATIC_ASSERT(((pri >= _PRIO_APP_HIGH) && (pri <= _PRIO_APP_MID)) || ((pri >= _PRIO_APP_LOW) && (pri <= _PRIO_APP_LOWEST)))
added to the list of known issues in SDK12.x.0. I have also created internal ticket to fix this and remove the hardcoded values and use the enum defines instead.
It has been fixed in nRF5 SDK 12.2.0.