configAssert() in port.c file with M3 with uCMaxSysCallPriority

Hello,
Similar to the issue “Confusing-docs-on-interrupt-priority-on-arm-cm3-trigger-configassert/21103” [I am new so, can’t put the link], I see configAssert() raised at line 340 in port.c where the uCmaxSysCallPriority value comes to be 0.
In system, we are using 3 priority bits and ucMaxPriorityValue coming as 0xE0 (224) while configMAX_SYSCALL_INTERRUPT_PRIORITY this value is 5 result into uCmaxSysCallPriority = 0xE0 & 0x5 = 0. It results into assertion, If the other priority bits are set then the configAssert at line 340 pass but the next configAssert fails.
/* Check that the bits not implemented in hardware are zero in
* configMAX_SYSCALL_INTERRUPT_PRIORITY. */
configASSERT( ( configMAX_SYSCALL_INTERRUPT_PRIORITY & ( ~ucMaxPriorityValue ) ) == 0U );
If I don’t have commit a9e1f668497b9832edd4f1a85a1d37f4e8409cf9 for Cortex M3 port, then I see the FreeRTOS runs fine. Is there I can do to fix this configAsserts() ?

Thanks,
Tejas Joglekar

Hi Tejas, The guide describes the priority bits implementation in Cortex-M devices, especially the section Running the RTOS on a ARM Cortex-M Core - FreeRTOS™. Since in the system, there are only 3-bits implemented, the value set for configMAX_SYSCALL_INTERRUPT_PRIORITY needs to be adjusted accordingly. The demo shows an example.

As @urutva mentioned, you need to update the definition of configMAX_SYSCALL_INTERRUPT_PRIORITY:

#define configPRIO_BITS 3
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY	5

#define configMAX_SYSCALL_INTERRUPT_PRIORITY 	( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )

Thank you @urutva and @aggarg, I modified the FreeRTOS config header file, and it is working as expected.