2025-11-03 4:39 AM - edited 2025-11-03 4:59 AM
Dear ST Support Team,
I’m currently trying to run the ST67W6X_CLI application (from the Wi-Fi ST67W6X CLI Wiki)
using the following setup:
Wi-Fi Expansion Board: X-NUCLEO-67W61M1
Host MCU Board: NUCLEO-F446RE
IDE: STM32CubeIDE (latest version)
Middleware: FreeRTOS (as provided in the ST67W6X_CLI example)
The project builds successfully and the firmware is programmed without errors, but at runtime, I encounter a HardFault_Handler.
The fault occurs inside the FreeRTOS queue management code, specifically during a call to xQueueReceive() in queue.c.
When the fault occurs, the debugger stops inside:
prvCopyDataFromQueue(pxQueue, pvBuffer);
and the corrupted member is:
pxQueue->uxItemSize
Observed value: 536871212 (0x2000412C) — which clearly points to an invalid or corrupted queue structure.
Call stack snapshot:
HardFault_Handler()
prvCopyDataFromQueue() at queue.c
xQueueReceive() at queue.c
spi_get_txbuf() at spi_iface.c
Please see the attached screenshot (from STM32CubeIDE) showing the variable states at the moment of the fault.
#### Welcome to ST67W6X CLI Application #####
build: 02:35:06 Nov 3 2025
--------------- Host info ---------------
Host FW Version: 1.1.0
[ERROR] [4000] [ST67W6XTask] (w61_at_common.c:375) sem_if_ready not received
[ERROR] [4000] [ST67W6XTask] (w61_at_sys.c:314) Could not init Modem handler
[ERROR] [4000] [ST67W6XTask] (main_app.c:791) [ERROR] in W6X_Init API
[ERROR] [4000] [ST67W6XTask] (w6x_sys.c:101) W61 Init failed
[ERROR] [4000] [ST67W6XTask] (main_app.c:291) failed to initialize ST67W6X Driver, 2
Application end
Note:
This output appears only during debugging. When the application is executed standalone (without debugger), no console output appears and initialization fails silently.
The project compiles and links successfully without any warnings or missing paths.
I have configured FreeRTOS parameters exactly as recommended in the CLI_App Example (including heap size and default task stack).
The configTOTAL_HEAP_SIZE and task stack sizes match the reference configuration.
some custom modifications were made to (fota.c).
The same application is confirmed to work on NUCLEO-U575ZI-Q, NUCLEO-H563ZI, and other officially supported boards.
So far, I have only flashed the host MCU (NUCLEO-F446RE) with the CLI example firmware.
I did not flash any binary to the ST67W6X module itself.
Could the issue (sem_if_ready not received and W61 Init failed) be caused by missing or outdated firmware on the Wi-Fi module?
Could this HardFault be due to memory alignment, DMA transfer, or structure packing differences on STM32F4 compared to the U5/H5 families?
Are there any additional adjustments to FreeRTOS memory or SPI interface required to make this demo compatible with F4 series MCUs?