On debug mode, Hard fault is detected on SysTick_Handler()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-07-04 6:11 AM
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
- Labels:
-
STM32U5 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-07-04 9:33 AM - edited 2023-07-04 9:33 AM
- 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.
