cancel
Showing results for 
Search instead for 
Did you mean: 

X-NUCLEO-67W61M1 + NUCLEO-F446RE compatibility — HardFault in FreeRTOS xQueue (ST67W6X_CLI)

SelimMuhammed
Associate II

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.

 

Debug Information:

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.

 

Runtime Log Output (During Debugging Only):

#### 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.


What I Have Verified So Far:

  • 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.

Important Note on Module Firmware:

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?

 

Questions:

  1. Could this HardFault be due to memory alignment, DMA transfer, or structure packing differences on STM32F4 compared to the U5/H5 families?

  2. Are there any additional adjustments to FreeRTOS memory or SPI interface required to make this demo compatible with F4 series MCUs?

  3. Should the ST67W6X module firmware also be updated or flashed before running the CLI application?
  4. If yes, could you please confirm if this file NCP_update_mission_profile_t01.bat in the path: x-cube-st67w61\Projects\ST67W6X_Utilities\Binaries is the required one or not?

 

4 REPLIES 4
TarikAb
ST Employee

Hello SelimMuhammed,

It appears that you have an ST67 module with an early binary that requires an update. This update is necessary regardless of the STM32 device you are using, including officially supported STM32 devices. Therefore, it is strange when you say that the application functions correctly on the NUCLEO-U575ZI-Q, NUCLEO-H563ZI, and other officially supported Nucleo boards.

Since you have a NUCLEO-U575ZI-Q board, connect it to the module and execute either CP_update_mission_profile_t01.bat or CP_update_mission_profile_t02.bat to update the module binary and load the CLI application binary. The choice between the t01 or t02 file depends on whether you want the LWIP to operate on the module or the host. After completing the update, verify that the CLI application is functioning correctly and that you can connect to a Wi-Fi network.

Once the module is updated, proceed to the NUCLEO-F446RE and check the status again.

Please share the results.

Best regards,

 


In order 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.

Thanks alot TarikAb
I really appreciate your reply
I would like to clarify something regarding this topic that when I said that the application functions correctly on the NUCLEO-U575ZI-Q, NUCLEO-H563ZI, and other officially supported Nucleo boards.
It was according to the wiki and documentation, not my experience so I didn't try to run CLI App on any of these boards.
Unfortunately, I don't have any of these Nucleo boards right now except the one that I have mentioned before (Nucleo-F446RE)
So, my question now: Could I flash the binary CP_update_mission_profile_t01.bat while I have this board (Nucleo-F446RE) as Host?

TarikAb
ST Employee

Hi again.

The short answer is yes but you need to go through some steps.

- Migrate NCP_Loader project to your NUCLEO-F446RE target just like you did with the CLI project and build it to generate the Bootloader.bin binary file. You could start from the U5 project which you can find under Projects\NUCLEO-U575ZI-Q\Utilities\NCP\NCP_Loader.

- Edit the .bat file so that it uses your Bootloader.bin and ST67W6X_CLI.bin files instead of the ones that were provided by the package.

- Run the .bat file

 


In order 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.

Hi again, TarikAb.

I would like to inform you that, I have migrated the CLI project according to the steps In the Wiki to build the project correctly although, I still have Runtime issues as I have mentioned in my post.

So, would you please recommend me a reference contains steps to migrate NCP_Loader project to my NUCLEO-F446RE target?