2025-07-11 1:18 AM - last edited on 2025-07-11 2:57 AM by mƎALLEm
I’m using NUCLEO STM32H753ZI.
I use ST ID: STM32cudeIDE
I have HardFault_Handler when call vTaskStart_Scheduler() using FreeRTOS
Could you please let me know how to resolve this issue?
Below is the sample code
int main(void)
{
(void) HAL_Init();
/* Configure the system clock */
SystemClock_Config();
/* Enable the CPU Cache */
CPU_CACHE_Enable();
BaseType_t xReturned;
TaskHandle_t xHandle = NULL;
/* Create tasks /
xReturned = xTaskCreate(
Task_Code,
“SB”,
configMINIMAL_STACK_SIZE,
(void) NULL,
tskIDLE_PRIORITY+2U,
&xHandle
);
if( xReturned == pdPASS )
{
vTaskStartScheduler();
}
else
{
}
while(1);
2025-07-11 6:33 AM
Hello @EddiePark
Could you increase your heap and stack size and try again?
2025-07-11 7:06 AM
Hi,
I increase the heap and stack size. but the result is same.
Thanks
2025-07-11 8:03 AM
Hello @EddiePark
Please refer to the article below to debug hardfault:
How to debug a HardFault on an Arm® Cortex®-M STM3... - STMicroelectronics Community