cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6570-DK can run Model Zoo examples but not custom quantized model — possible 4.2 MB SRAM limit?

BCPH357
Associate II

I’m currently testing my own quantized model on the STM32N6570-DK, using the official X-CUBE-AI application example.
All Model Zoo examples (e.g. SSD, image classification) run perfectly with the same firmware and codebase.
However, when I replace the model with my own quantized TensorFlow Lite model (Zero-DCE, converted with ST Edge AI Developer Cloud), the inference process freezes — even though the conversion and compilation complete without errors.

I’m wondering if there is a hard restriction that prevents models from running when used RAM exceeds the on-chip SRAM (≈ 4.2 MB), even though the report shows that part of the activations are mapped to external HyperRAM.

Here are the key parts of my Edge AI Core 2.2.0 generation report:

ST Edge AI Core v2.2.0-20266
Model name: zerodce_int8_192

Total memory usage:
----------------------------------------------
Total: 11.643 MB
Weights: 78.751 KB
Activations: 11.566 MB

Memory mapping:
cpuRAM2 [0x34100000 - 0x34200000]: 1.000 MB
npuRAM3 [0x34200000 - 0x34270000]: 416 KB
npuRAM4 [0x34270000 - 0x342E0000]: 432 KB
npuRAM5 [0x342E0000 - 0x34350000]: 432 KB
npuRAM6 [0x34350000 - 0x343C0000]: 324 KB
octoFlash [0x71000000 - 0x71080000]: 78.7 KB (weights)
hyperRAM [0x90000000 - 0x90900000]: 9.000 MB (activations)

Epochs:
Total: 36, of which 1 implemented in software (Split)

So the model uses around 11.6 MB total, with 9 MB activations placed in HyperRAM.
But in practice, the device freezes as soon as inference begins, while the SSD model (which uses less than 4 MB RAM) runs normally on the same code and hardware.

My questions are:

  1. Is there a hardware or runtime limitation preventing models that exceed the internal SRAM size (≈ 4.2 MB) from running, even if the memory pool maps to external RAM?

  2. Does the runtime require additional configuration (e.g. MPU or cache attributes) to allow activations in HyperRAM to be used safely?

  3. Are there recommended memory profiles or examples for models > 4 MB activations on STM32N6570-DK?

Any insights or examples from ST engineers or community members who have successfully run large models (using external RAM) would be greatly appreciated.

0 REPLIES 0