2025-06-22 5:37 PM - edited 2025-06-22 5:52 PM
Hi All
This has been reported in various forms since 2019:
https://community.st.com/t5/stm32-mpus-products-and-hardware/freertos-does-not-run-on-stm32mp1-m4-core/m-p/302468
and
https://community.st.com/t5/stm32-mpus-embedded-software-and/hal-tick-does-not-get-incremented-on-second-debug-session-after/m-p/259405
and apparently it was flagged as solved.
Yes it was solved in "OpenAMP_FreeRTOS_echo" project but it was never solved in STM32CubeMX code generation for STM32MP M4 processor.
Fault was in code that would enable TIMx interrupt before TIMx was initialized so it instance was NULL.
Code generated by CubeMX version 6.14.1 and "STM32Cube_FW_MP1_V1.6.0" firmware still generates the same code that ebnables TIMx before TIMx.Instance is set to any value:
TIMx IRQ is raised somewhere before TIMx.Instance is set and that causes IRQ service routine to disable TIMx IRQ.
We've fixed that by comparing code "OpenAMP_FreeRTOS_echo" in and STM32CubeMX generated code.
There enabling of TIMx IRQ was moved further down in code and it is started only when TIMx is initialised:
To say that these things cause frustration with us experienced STM32 developer is understatement.
This problem has been flagged as problem 6 years ago and it still not fixed in STM32CubeMX generation code for STM32MP M4 MCU.