2025-10-27 12:49 PM
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!
2025-10-30 7:17 AM
Hello @Fef ;
I recommend you to look at How to debug a HardFault on an Arm® Cortex®-M STM3... - STMicroelectronics Community article, may help you to check the hardfault root cause.
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-11-02 6:48 AM
Thank you for your reply.
I believe the issue is related to the memory coexistence between the display management application and the RTOS running with the EMW3080 WiFi module. Both components together consume too much memory space, and to mitigate this I am considering removing the RTOS.
As mentioned earlier, both applications run perfectly fine when executed separately.
I am currently attempting to decouple the EMW3080 from the RTOS, but they appear to be tightly integrated in the example: X-CUBE-AZRTOS-H7RS/1.1.0/Projects/STM32H7S78-DK/Applications/NetXDuo/Nx_Iperf_wifi.
So far, I haven’t been able to run the WiFi applications without the RTOS, even after adjusting the #define options for a “bare-metal” configuration.
If you have any lightweight EMW3080 drivers suitable for a simple “bare-metal” implementation, I would greatly appreciate it.
Thanks again for your support.