Why does the HAL Tick timer stop incrementing after creating a FreeRTOS mutex in STM32CubeIDE?

I've been working on an STM32 project using STM32CubeIDE 1.11.2 with CubeMX 6.7.0, and I'm testing on the Nucleo-F767ZI board. After creating a FreeRTOS mutex, I've noticed that the HAL Tick timer stops incrementing.

Here's what I've done so far:

  1. I started a new STM32 project in STM32CubeIDE with all default settings.
  2. I opened the .ioc file in the MX perspective and enabled FreeRTOS support using the CMSIS_V2 interface.
  3. In `main.c`, right after `osKernelInitialize()`, I added the following code:```cosMutexId_t mutex = osMutexNew(0);HAL_Delay(100);```The issue is that the code gets stuck in `HAL_Delay()`—the `SysTick_Handler` is never called, and `HAL_GetTick()` always returns the same value (10 in my case).
I've tried using both CMSIS and FreeRTOS mutex functions with the same result. I've also experimented with changing the SysTick time base and tested on another Nucleo board, but the issue persists.

What could I be missing?
Solution
Posted on November 21, 2014 at 19:54 Hello, in xPortStartScheduler routine, the systick priority is forced to /* Make PendSV and SysTick the lowest priority interrupts. */ Some HAL interrupt drivers implement a time out based upon systick value. With systick priority set to lowest priority the ...
Was this page helpful?