cancel
Showing results for 
Search instead for 
Did you mean: 

On debug mode, Hard fault is detected on SysTick_Handler()

calve1
Associate

Hi all,

I use STM32CubeIDE version 1.12.0 and STM32CubeMX Version: 6.8.0-RC4.

The MCU used is STM32U585

When i start my software in debug mode, some times a HardFault is detected on SysTick_Handler function.

If i use the IWDG (with compilation option named bOPTION_WITH_WATCHDOG set to 1 (see line 46 on main.c)), a HardFault is detected systematicaly on SysTick_Handler function.

If i use the sprintf instruction (compilation option named bOPTION_WITH_SPRINTF set to 1 (see line 47 on main.c)), a HardFault is detected systematicaly on SysTick_Handler function when debugger execute "sprintf(sMsg,"%3.1f",fValue);"

See all my project in attached file and a screenshot of the hardFault detected.

Thanks in advance

Christophe ALVERNHE

1 REPLY 1
Pavel A.
Evangelist III
  • From the screenshot we can see that you use FreeRTOS and the fault is caused by a null pointer in some FreeRTOS internal list. As FreeRTOS is pretty stable, a bug there is unlikely. Watch for things like memory overwrites, task stack overwrite and so on. Happy debugging.