2024-06-28 1:00 AM - last edited on 2025-11-04 7:54 AM by Andrew Neil
Originally posted in MCUs forum; moved to MPUs, as STM32MP is an MPU - not an MCU.
Hello Everyone,
I am working with FreeRTOS on an STM32MP157CAA and configuring the CM4 core in engineering mode using CubeIDE. According to the documentation, it's necessary to select a timer other than SysTick for the HAL timebase. However, in CubeIDE, under the SYS settings in the Pinout tab, I only see SysTick available as an option.
When I generate the code, I receive the following warning:
WARNING:
When RTOS is used, it is strongly recommended to use a HAL timebase source other than the SysTick. The HAL time base source can be changed from the Pinout tab under SYS.
Despite this, I am unable to select any other timebase source besides SysTick.
Could anyone provide guidance on how to configure a different HAL timebase source for FreeRTOS in this setup? Any advice or workaround would be greatly appreciated.
Thank you!
2025-11-05 5:25 AM
@Andrew Neil wrote:I find the first step in optimising HAL code is to get rid of all the redundant checks for handling stuff I'm not using.
This gets me back on topic: FreeRTOS and HAL use of systick:
@AScha.3 is correct in that I should never use blocking functions. This indeed spoils the fundamentals of an RTOS although you could debate if a transaction that takes just 100 µs or so is worth the overhead ( depends completely of the application I guess).
Optimizing the HAL is a great idea. I could remove all blocking functions and optimize functions to not check on features I do not use. That should also remove the need to use a HAL systick allowing me to use a TICKLESS_IDLE configuration.
Thank you both for your response, this made me dive a bit deeper in HAL code that I wanted to but it also provided me with some new insights that help me to find a solution for my problem.
Cheers,
Rob
2025-11-05 5:45 AM
@RobJ wrote:This gets me back on topic:
I'm not sure that it's really on topic: @YasirR was asking about an MPU, but I think you, I and @AScha.3 are talking MCUs?