2025-11-04 4:13 AM
Hey!
I'm trying to run my AI model on my NUCLEO-657X0-Q, following @Julian E. great guide in here.
I have 2 questions:
1. My model has some running issues during booting.
In the FSBL code that suppose to jump to the application (JumpToApplication) there is some crash between the start of __set_MSP() and the start of _set_PRIMASK(), I would say it maybe an error in the pointer to the application code, but when I run it step by step in the IDE's debugger it works just fine.
Do you have an idea of why would that happen / how to debug it? (I don't have printings at this stage, and turning in the LEDs in the middle of stack switch makes it fail in the debugger too).
2. When my model do run (in the debugger) I get to the point where I start the epoch block, but no outputs / epoch end, and it just gets stuck in the loop. Does it happens because it's in debugger mode, or maybe my model is not compatible? when I validated it in CubeMX AI extension it looked ok.
Is there any way to debug what happens in the NPU?
Thanks for the help!
Solved! Go to Solution.
2025-11-24 1:59 AM
After many tries and errors, my issue was using the latest firmware version of the board and not v1.1.1 like it said in the manual. I also changed the network address from 0x240... to 0x3400....
Later, my model had also a RAM size issue, that was not detected by the AI tool since it assumed the board have 32MB hyperRAM (it does not), but once I reduced its RAM consumption I got nice outputs :)
Thanks for the help!
2025-11-19 5:11 AM - edited 2025-11-19 5:13 AM
Hi @amirkfir,
The STM32n6 is badly supported by cubeMX and I believe that your issue is probably due to something wrong happening when following the tutorial. Even I have difficult replicating it...
I would suggest looking at the bare metal application that are the getting started that you can find here:
STM32N6-AI | Software - STMicroelectronics
And the hello_world example in your local install of the st edge ai core (either in its own folder or in cubemx packages depending on how it was installed):
STM32N6 Example projects & tips for creating new projects
The idea of the leds was to help the user understand where its potential issue was coming from (fsbl or application). It is not possible to debug what happens inside the NPU itself.
We have in mind to improve the tutorials and experience with the N6, but it is one of the most complicated STM32 to use and the fact that it is badly supported by cubeMX do not helps...
It is advised not to use cubeMX for application dev for the N6, but to look at the documentation and the example we created.
Have a good day,
Julian
2025-11-24 1:59 AM
After many tries and errors, my issue was using the latest firmware version of the board and not v1.1.1 like it said in the manual. I also changed the network address from 0x240... to 0x3400....
Later, my model had also a RAM size issue, that was not detected by the AI tool since it assumed the board have 32MB hyperRAM (it does not), but once I reduced its RAM consumption I got nice outputs :)
Thanks for the help!