2025-11-15 11:54 PM
Good day Folks,
Firstly, is it possible to put NN weights on the external Flash, but not use it in memory mapped mode?
BSP_XSPI_NOR_Init_t NOR_Init;
NOR_Init.InterfaceMode = BSP_XSPI_NOR_OPI_MODE;
NOR_Init.TransferRate = BSP_XSPI_NOR_DTR_TRANSFER;
BSP_XSPI_NOR_Init(0, &NOR_Init);
BSP_XSPI_NOR_EnableMemoryMappedMode(0);Secondly is it possible to run an AI model with NO flash access at all, i.e. to only use internal RAM for the case of a small model?
I have an application that is already using the flash for storing data such as Logs & settings, via a XSPI Read/Write interface. However that interface is broken when configuring the flash to use the memory map.
The image classification STM32N6570-DK example code runs fine and can use the external flash, however it then appears I can't use the Flash for anything else but the NN tables & weights.
I then tried updating the .mpool to exclude using the Flash, but the model is then not working or giving the same inference results.
{
"fname": "xSPI2",
"name": "octoFlash",
"fformat": "FORMAT_RAW",
"prop": { "rights": "ACC_READ", "throughput": "MID", "latency": "HIGH", "byteWidth": 1, "freqRatio": 6.00, "cacheable": "CACHEABLE_ON", "read_power": 110, "write_power": 400.0, "constants_preferred": "true" },
"offset": { "value": "0x70680000", "magnitude": "BYTES" },
"size": { "value": "0", "magnitude": "KBYTES" }
}Thirdly, if flash access is REQUIRED is it possible to read the required constants out of flash into a RAM buffer when the NN is initialised, so Flash access is not required on every inference?
Thank you in advance, I am really hoping we can navigate this so the flash can be used by other subsystems and not just the NN.
Regards