Systick preemption not working
Hello,
We are working on a project since some years so it begin to be quite big.
We are running FreeRTOS under the cmsisOs2 API.
Recently, we added an external flash on our SPI bus and started to experience timings issues:
The SPI is using HAL with transmit/receive in IT mode (priority 5).
We found that in receive mode, the CPU is quite stressed by ITs and the HAL IT handler.
It results that our systick (priority 0) is missing 12 preemption over 13 (one every 13 ms) when we do these reads.
I will configure DMA bus on this SPI to free CPU, but first i want to be sure i don't made a mistake in NVIC configuration.
In my understanding, even if an IT is currently running, an IT with higher priority can preempt it and do its execution before returning to the previous IT context.
Why in my case systick handler don't "ake the lead"? Even if the SPI IT has returned...
In the traces below, i toggled GPIOs at IT contexts enter/exit. As you can see, systick is executing normally until SPI reads, where we clearly see that systick wait a big gap to execute...

I suspect FreeRTOS to modify priorities....
