Skip to main content
Associate III
August 8, 2026
Question

Can STM32N6 NPU be used directly from HAL without X-CUBE-AI?

  • August 8, 2026
  • 3 replies
  • 43 views

Hi ST Community,

I am working with an STM32N657 and would like to use the integrated NPU directly from my own C/C++ application.

I understand that X-CUBE-AI together with the Neural-ART can generate the code required to execute a neural-network model on the STM32N6 NPU.

However, I would like to understand whether it is possible to use the NPU without X-CUBE-AI.

Does STM32CubeIde provide HAL APIs that allow an application to directly initialize, configure, load, and start the STM32N6 NPU?

3 replies

AScha.3
Super User
August 8, 2026

Hi,

just from Gemini :

No, the STM32N657's Neural-ART Accelerator (NPU) cannot be used directly through standard STM32 HAL function calls without X-CUBE-AI or the underlying ST Edge AI Core runtime. [1, 2, 3, 4, 5]

Why You Need X-CUBE-AI / ST Edge AI Suite

  • Model Compilation: The Neural-ART Accelerator requires specialized binary instruction blocks ("epochs") and layer-to-hardware mapping generated by the ST Edge AI compiler. Standard HAL drivers do not parse or translate neural network models (like TensorFlow Lite or ONNX). [1, 3]
  • Memory Management: The NPU compiler dynamically assigns activation buffers and weights across specific internal NPU-RAMs and external memories based on bandwidth and performance constraints. This goes far beyond standard peripheral-oriented HAL memory handling. [1]
  • Runtime Execution: Interfacing with the NPU requires the Neural-ART runtime library to load, trigger, and retrieve inference outputs, which is packaged and instantiated through the X-CUBE-AI ecosystem rather than standalone HAL headers. [1, 2, 3]

If you're planning an implementation, tell me:

  • Are you trying to avoid code generation to build a custom low-level wrapper?
  • What AI framework format (e.g., .tflite, .onnx) is your model in?

I can share more details on how to interface a minimal runtime library with your application structure.

If you feel a post has answered your question, please click on " Best Answer ".
SaeidAuthor
Associate III
August 8, 2026

Hi ​@AScha.3 

Thanks for sharing your search results. 

I got the same result from ChatGPT, but I’d love to know if ST provides an NPU interface ( functions, library) to be used in an application code.

Have you implemented any AI application with STM32N6 ?

Julian E.
ST Technical Moderator
August 10, 2026

Hi ​@Saeid,

 

The information is correct, today you cannot use it directly.

One point, X Cube AI is not deprecated, please use STM32CubeAI Studio, a desktop application that should be easier to use.

STM32Cube AI Studio- The next-gen stand-alone tool for embedded AI - STMicroelectronics


This tool is able to support MX and MX2 targets.

 

For AI application on STM32N6, you can find example packages here:

STM32N6-AI | Software - STMicroelectronics

 

And in STM32Cube AI Studio, you can import a model and export a template application that only runs your model with random input data and print the output via serial.

 

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.