Sterling
DIIDevHeads IoT Integration Server
•Created by Sterling on 8/16/2024 in #middleware-and-os
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:
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?7 replies