Hello Community
I would like to make use of your broad knowledge and experience. The following initial situation:
I have an Arduino Nano 33 IoT with the following tech specs: SAMD21G18A 48MHz Cortex®-M0+ 32bit low power ARM MCU with Memory 256 KB SRAM, 1MB flash and a Nina W102 uBlox module with 448 KB ROM, 520KB SRAM, 2MB Flash. The current version of the standard firmware of the Nina W102 is 1.5.0 and therefore only allows operation via Bluetooth "or" WiFi. This leads to my actual problem.
In my application, I have permanently connected a "central" to my board via BLE and receive constant data from it via a BLE_WRITE characteristic. So far, everything is working perfectly. But now I'm getting to the point where I want to use the integrated flash memory of the SAMD21 and/or Nina W102 (of course I know that not all memory is available for the application itself at runtime) for reading and writing files, a kind of SPIFFS, so to speak, to be able to read and write data on the flash memory in an orderly manner.
I also know that if you use the Nina W102 chip as WiFi, you can use the WiFiStorage for this and this would also simply solve it for WiFi operation with the 2MB flash. But in Bluetooth mode, I can't access the WiFiStorage for reading or writing without always switching back and forth between WiFi and Bluetooth. This would, of course, interrupt the connection to the "central" and unfortunately I cannot implement this.
Hence my question to you as a community; How can I access one of the flash memories in parallel in active BLE mode in a kind of SPIFFS as a mini file system, equivalent to WiFiStorage on the Nina W102 for reading and writing. And of course this is best done without having to "hack" the firmware of the Nina W102 chip.
I have already tried the "FlashStorage_SAMD library", but the methods contained there for handling as EEPROM only show me a max. EEPROM.length() of 1024 on my model. And there should actually be considerably more space available here at runtime. I have also tried to define my "struct" with PROGMEM, but the data types are still too large in the worst case, so that the RAM would of course be full more quickly.
In the end, I actually have to load a maximum of approx. 6000 bytes from various file names from the flash memory from a file and process the content in a small buffer in the application itself and then release it again. Perhaps you know much better and simpler options?
Many thanks in advance for your suggestions and for sharing your experiences on this topic!