cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N657 XIP + STM32CubeAI Studio – aiRun() stuck in LL_ATON_RT_WFE loop

ayaaaa
Associate III

 

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):

.addr_base = (unsigned char *)(0x71000000UL)

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:

 

 
do {
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 

11 REPLIES 11
ayaaaa
Associate III

This is what im getting with the latest configuration that you proposed 

ayaaaa_0-1777965719184.png

ayaaaa_1-1777965761790.png

 

Hi @ayaaaa ,

 

Please let us know if you still have this issue with the ST Edge AI Core 4.0

 

Have a good day,

Julian


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.