How do I change the interrupt priority so I could pass relevant assertions?

I think sooner or later you likely want to adjust the different interrupt priorities.
I’d recommend to read the FreeRTOS docs regarding RTOS for ARM Cortex-M .
Also e.g. Understanding priority levels of ISR and FreeRTOS APIs - #16 by aggarg contains a good and easy to understand explanation.
There are much more posts regarding interrupt priorities in the forum (search: configMAX_SYSCALL_INTERRUPT_PRIORITY)

Usually there a CMSIS API for the NVIC (on Cortex-M) including NVIC_SetPriority().