Question
CubeMX 4.3.1 - FreeRTOS SysTick and HardFault
Posted on September 29, 2014 at 11:38
Hello,
I am using the STM32F3 Discovery Board to try out CubeMX for IAR and FreeRTOS.I have encountered the following situation, where the system hangs:SysTick_Handler
is never reached. The system hangs in theHardFault_Handler
.I have replaced the code inSysTick_Handler
as mentioned in the fora by ST employees to:if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED)
{
xPortSysTickHandler();
}
HAL_IncTick();
but this is irrelevant, since the device branches to the
HardFault_Handler
before ever reaching theSysTick_Handler.
The solution I have found to this, is to comment out theosDelay(1)
line inStartThread
thread, or completely avoid using this thread.I have tested this with a single other thread, written by me and it works well.I will reply to this post, after testing with more threads.I do not know the true cause to this mishap, but I'd like to see this fixed since it's something that is given as a starting point for Discovery and Development Kits.Regards,George #freertos #cubemx