Skip to main content
MMostafa
Associate II
January 24, 2023
Question

Hard Fault error with Emwin & FreeRTOS

  • January 24, 2023
  • 2 replies
  • 1035 views

I am working with ST32F469 Disco and I am using FreeRTOS and emWin library.

When I am calling Gui_Init() before starting FreeRTOS kernel, my application works fine with no problems. When I move Gui_Init() To the task which is used for emWin scheduled before While(1), I always had a hard fault error. If I only moved the function before the schedule again it works fine. I had only one task which calls the Gui_Exec(). It seems it is a problem with the FreeRTOS configurations but I am not able to catch it.

Anysupport about this issue?

This topic has been closed for replies.

2 replies

ST Technical Moderator
January 24, 2023

Hello @MMostafa​ ,

Make sure that CRC module (in RCC peripheral clock enable register) is enabled before calling GUI_Init, if not STemWin will be not work.

Imen 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
MMostafa
MMostafaAuthor
Associate II
January 24, 2023

Hello,

CRC module clock is enabled and CRC module is working before calling GUI_Init().

The program is working correctly when it is called before FreeRTOS kernel start.

What could be other issues?