2025-04-22 8:21 PM
I am using the STM32N6570-DK board to run AI model on it. And I have modified the stm32n6.mpool file because the board actually have a 1‑Gbit Octo‑SPI flash memory, which is 128MB instead of 64MB. But even if I have already adjusted it, the cubemx still shows "Used Flash:3.51MB(.00B over 64.00 MiB xSPI2)". Is there a problem and how I can fix it? By the way, I want to know that where I can get some examples about using AI on the STM32N6570-DK board, and the correct way to modify the files so that I can use the external memory on the board.
2025-04-23 8:29 AM - edited 2025-04-23 8:35 AM
Hello @Z-YF,
First, note that if you work with the external memory, the performance of your model in terms of inference time will reduce drastically.
Then you are right, there is indeed 128MB on the DK. 64 is for the Nucleo.
From my understanding, it should be fixed next release.
I think it is only a interface issue, when you do a validate, here is what I get:
For examples using AI, you can look at the getting started:
https://www.st.com/en/development-tools/stm32n6-ai.html#overview
Note on the memory pool:
When the NPU compiler can use two memory locations to fit, for example, an activation buffer, it decides which location is ‘the best’ based on estimated data access time. For this allocation algorithm to perform well, it is then required to describe the memory with as much accuracy as possible.
The example mpool
files are written for STM32N6 and contain descriptions for each internal memory cuts + external memories accessed through XSPI:
Have a good day,
Julian
2025-04-23 8:34 AM
Thank you, but I still want to confirm that if I use the configuration according to the picture above, the 3.51MiB used FLASH will be stored in the external 1Gbit FLASH, right?
2025-04-24 12:29 AM
Hello @Z-YF,
Yes, I think.
I would advise you to look at the table I sent in my last message.
When you do a Analyse, you get the exact detail of the memory used.
Have a good day,
Julian