stm32f746g-disco and emWin (HardFault_Handler in GUI_Exec)

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • stm32f746g-disco and emWin (HardFault_Handler in GUI_Exec)

    I continue to understand with stm32f746g-disco (first topic).
    I made a simple window:
    [img]http://i.piccy.info/i9/337b4d20c2f5c677cd090d4c4c4f0dd0/1462555096/14262/1027479/01.png[/img]
    (Img)
    I use the example of STM32Cube_FW_F7_V1.3.0\Projects\STM32746G-Discovery\Applications\STemWin\STemWin_HelloWorld.
    I made only two changes:
    In main.c, I disabled the CACHE: // CPU_CACHE_Enable();
    In BASIC_HelloWorld.c I call the function CreateWindow():

    C Source Code

    1. void MainTask(void)
    2. {
    3. /*
    4. GUI_Clear();
    5. GUI_SetFont(&GUI_Font20_1);
    6. GUI_DispStringAt("Hello world!", (LCD_GetXSize()-100)/2, (LCD_GetYSize()-20)/2);
    7. while(1);
    8. */
    9. CreateWindow();
    10. GUI_Exec();
    11. while (1)
    12. {
    13. //GUI_Delay(100);
    14. }
    15. }
    Display All


    The program hangs in HardFault_Handler:
    [img]http://i.piccy.info/i9/e928509d5e609dc21fedda20255f38e6/1462555104/81092/1027479/02.jpg[/img]
    (Img)

    What am I doing wrong?
    Thank you.

    The files from: Inc, Src, Hex.
  • Hi,
    i have a similar problem of HardFault_Handler with Emwin and Freertos...and i don't understand where is the mistake. Anyway my problem is related to the static dialog created by the segger application.
    In my case the Hardfault occours when i attempt to write to a widget, for example using a method like:

    C Source Code

    1. MULTIEDIT_AddText(hItem,"test");


    Instead, if i write to this widget with the method

    C Source Code

    1. MULTIEDIT_SetText(hItem, "test");


    i have no hardfault.

    Anyway, now i would try to use emwin without an RTOS to reduce the possible causes of an hardfault.

    ps.: i suggest to see stm32f4-discovery.com/2015/01/…mwin-stm32f429-discovery/