no switching immediately to higher priority task

I am observing an unusual behavior. There are 2 tasks: Task 1, priority = MIN+1 Task 2, priority = MIN+5 Task 1 signals Task 2 but the higher priority task does not run immediately. Several signals are sent before Task 2 starts. I verified that PREEMPTION is enabled. We are using the STMCube utilities for STM32F7xx processor to generate the FreeRTOS code. It is FreeRTOS version 9. Any explaination for this behavior? Thanks

no switching immediately to higher priority task

Sorry to hear you are having an issue but I’m afraid your post does not provide enough information to answer your question. Perhaps if you could start by describing how you are signalling one task from another, and ideally post some code that is cut down to the bare minimum that demonstrates the issue – for example a basic function that shows how the signal (whatever that is) is being sent, and a basic function that shows how the signal is being received.