cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7S78-DK: HardFault and/or LCD Timeout After Merging WiFi and Display Projects

Fef
Associate II

Hi everyone,

I am working on an STM32H7S78-DK with its built-in display and developing under Keil uVision 5. I am using the RTOS X-CUBE-AZRTOS-H7RS example with the WiFiEMW3080 module, specifically the following project:
Repository/Packs/STMicroelectronics/X-CUBE-AZRTOS-H7RS/1.1.0/Projects/STM32H7S78-DK/Applications/NetXDuo/Nx_Iperf_wifi.

Goal:
I want to create a weather display project on the screen using STemWin.

Current Status:
- I tested two projects independently:
1. WiFi project (with WiFiEMW3080): Works perfectly.
2. Display project (with STemWin): Works perfectly.
- I merged both projects and adapted the .sct file to define memory regions as follows:


/********************************************************************************************/
LOAD_FLASH 0x70000000 0x08000000 { ; load region size_region
ER_ROM 0x70000000 0x08000000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
ER_ITCM 0x00000000 0x00010000 { ; ITCM (64 KB) - Critical code executed in ITCM
}
RW_DTCM 0x20000000 0x00010000 { ; DTCM (64 KB) - Should be 128 KB?
*(STACK)
*(HEAP)
}
RW_RAM1 0x30000000 0x8000 { ; SRAM1/2/3 (32 KB) - Should be 512 KB?
}
RW_BKPSRAM 0x38800000 0x1000 { ; BKPSRAM (4 KB)
}
RW_EXTRAM 0x90000000 0x4000000 { ; XSPI RAM (64 MB)
;*(.xspi_section)
*(.external_ram)
}
RW_RAM 0x24000000 0x00080000 { ; 512 KB
.ANY (+RW +ZI)
}
RW_NONCACHEABLEBUFFER 0x2407F800 0x800 { ; 2 KB
*(noncacheable_buffer)
}
}
/********************************************************************************************/

Issue 1: HardFault on Launch
- Compilation and linking succeed, but when I run the program, I get an immediate HardFault.
- I suspect this is related to incorrect memory region definitions in the .sct file.

Issue 2: LCD Initialization Timeout
- If I modify the RW_EXTRAM region as follows:
RW_EXTRAM 0x90000000 0x4000000 { ; XSPI RAM (64 MB)
*(.xspi_section)
.ANY (+RW +ZI)
}
- The HardFault disappears, but I get an LCD initialization timeout error ("BSP_LCD_Init FAILED!").

Questions:
1. What is causing the HardFault when using the first .sct configuration?
2. Why does the LCD initialization fail when .ANY (+RW +ZI) is placed in RW_EXTRAM?
3. How should I configure the .sct file to ensure both WiFi and STemWin work together without conflicts?

Additional Information:

Stack_Size EQU 0x1000 ; 0x400
Heap_Size EQU 0x2000 ; 0x200

Thank you in advance for your help!

0 REPLIES 0