STM32N657 XIP + STM32CubeAI Studio – aiRun() stuck in LL_ATON_RT_WFE loop
Hello,
I’m working on a project generated by STM32Cube AI Studio targeting the NUCLEO-N657X0-Q, using an XIP configuration with external XSPI flash ( It was said in another post that the generated projects from STM cube AI Studio follow XIP configuration).
Setup
- Board: STM32N657X0-Q
- Toolchain: STM32CubeIDE(2.1.1) + STM32CubeProgrammer(2.22.0)
- Project generated with STM32Cube AI Studio
- Execution mode: XIP (application in external flash)
- Runtime: Bare metal (LL_ATON_OSAL_BARE_METAL)
Memory mapping
Model location (from generated network.c):
Programming steps
I programmed manually using STM32CubeProgrammer:
- second_Appli.elf
- network_atonbuf.xSPI2.bin → placed at 0x71000000
Debug configuration (FSBL project)
I start debugging from the FSBL project.
In Debug Configuration → Startup → Load Image and Symbols, I configured:
- second_Appli.elf
- Download = OFF (already flashed manually)
- Load symbols = ON
So FSBL is loaded/debugged, while App and model are already present in flash.
Additionally, I also tried adding the runtime GCC libraries to the FSBL debug configuration, but this did not change the behavior
What works
- FSBL runs correctly from RAM (0x3418xxxx)
- XSPI initialization seems correct
- Jump to application works
Application reaches:
STM32CubeAI_Studio_AI_Init();
STM32CubeAI_Studio_AI_Process();Execution enters:
aiRun();
Problem
Execution gets stuck in:
ll_aton_rt_ret = LL_ATON_RT_RunEpochBlock(&NN_Instance_network);
if (ll_aton_rt_ret == LL_ATON_RT_WFE)
LL_ATON_OSAL_WFE();
} while (ll_aton_rt_ret != LL_ATON_RT_DONE);
Observed behavior:
- ll_aton_rt_ret remains LL_ATON_RT_WFE
- Loop never exits
Question
- is this the right debug configuration for projects generated by STM Cube AI Studio ?
- if so ,is there additional steps before debugging so that the inference ?
Thanks for your assistance