Hi Sebastian,
Right – your config with NVIC_SetPriorityGrouping(4);
is correct. One improvement would be to modify the comment that says with 32 Subpriorities
to say with 0 subpriorities bxxx.zzzzz
. Only 3 bits are implemented (the x
bits) and the other 5 are unimplemented (the z
bits).
Your config with NVIC_SetPriorityGrouping(5);
(which would have 2 subpriorities) probably would work. It seems that the ARMv8-M ports (Cortex M23/M33) don’t actually prohibit the use of subpriorities like the ARMv7-M ports do. But I don’t know if FreeRTOS has officially lifted that requirement, so maybe best not to use subpriorities. I think @aggarg would know.