rtel wrote on Tuesday, July 16, 2013:
1) what range can I use for the task priorities? 1 to 15 or 1 to 255?
Please do not confuse task priorities and interrupt priorities. Task priorities are under the control of FreeRTOS, are the same for all ports, and are completely unrelated to interrupt priorities (and therefore not restricted in any way to the value of configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY).
On all FreeRTOS ports, 0 is the lowest task priority and (configMAX_PRIORITIES -1) is the highest task priority. configMAX_PRIORITIES is set in FreeRTOSConfig.h.
2) what range of task priorities will be masked out when entering a critical section?
No task priorities will be masked out by any critical section….ever.
Only interrupt priorities are masked, and in your case interrupts that have been assigned a priority of 5 or lower will be masked. Note that, due to the irrational way Cortex-M handles interrupt priorities, an interrupt assigned a priority of 4 has a higher logical priority than one assigned a priority of 5 (even though it is a lower number) so will not be masked, whereas an interrupt of priority 6 has a logical priority lower than one assigned a priority of 5 (even though it is a higher number) so will be masked.
Regards.