nrf5340 Interrupt Priority Bits

This is more of an informational inquiry than an issue.  The nrf5340 is based on the ARM Cortex M33 core, which allows for configurable priority grouping through the PRIGROUP value in the Application interrupt and Reset Control Register (ARM Cortex-M33 AIRCR).  The ARM documentation describes how, through the value written to PRIGROUP, you can configure up to 7 bits for configurable priority, allowing for 128 priority levels and 2 subpriority levels.

However, the definition __NVIC_PRIO_BITS in nrf5340_application.h is hardcoded to a value of 3.  When I try to change the number of priority bits through device tree (using the definition shown below in nrf5340_cpuapp.dtsi), I get a build error stating "NUM_IRQ_PRIO_BITS and __NVIC_PRIO_BITS are not set to the same value".

&nvic {
arm,num-irq-priority-bits = <4>;

};

Can you help me to understand why the nrf5340 is limiting the use of the additional available priority bits that are described in the ARM documentation?

Related