Memory available in Spark core apart from it's own firmware

Hi to everyone;

I’m trying to implement my own application in the spark core, but it’s a little bit more extense I firstly expected. I want to know how much memory remains in the device, taking into account the core’s firmware is already there.

I’m trying to figure out if the core is feasible for my application, or if I have to think in other alternatives.

Thanks in advance, and cheers!!!

1 Like

Theres about 4kb of memory for user applications on the Spark core.


In my experience the core uses roughly 70 kb of program memory that leaves you with 58 kB of program space.
Available RAM is 20KB, of wich a fair share is used by the core.
Does this help?


Yes, it helps for noticing that I can’t use my application as it’s right now in a Spark. I have an application aproximately 1MB heavy, so I have to re-consider it, either using another device, or changing completely my application architechture and code.

Thanks, sometimes is good enough knowing what you can’t do.


Goodluck, mayby a raspberry?

Let me break that down more, the CPU has 128kb of storage and the spark has an external 2Mb of flash that the use can use. Heres the memory map, I was told by Spark that the goals to always give the user 40kb’s of flash, my bad before a typo. There is more memory on the spark for the use I realized after checking hardware specks, heres a breakdown of memory.

“The external flash memory gives an additional 2MB of storage space. This space is used to store the public and private keys, the factory reset firmware, a back-up firmware and a copy of the firmware sent Over The Air (OTA). The rest of the memory space is available to the user.”

OK, Thaks Nicholas, so how can I use this external 2MB flash memory. From End of OTA Firware to the End of the Flash memory I have 0x180000 B of memory I guess (0x200000-0x80000=0x180000).

I’m really interested how to use this memory to extend my application use memory.


@zazola - IMB of firmware is a lot of code! is your application really 1MB of code - or is there a lot of data stored in program?

If it’s data then it may be possible to move this data to the external flash.

No, it’s not data, so I have to re-consider the architechture of my application. Maybe I can make a simpler application in Spark and make the major processing in a server or something similar. But still is very interesting to know how can I use this external memory, in case I need it.

maybe you can offload some of your processes to a cloud service or LAN server and have the core only doing the primary hardware functions. Or use two cores with subscribe() or even an ATTiny serially attached?

Just to clarify:

the stm32 cpu we’re using now has about 128KB of memory where your programs are stored, and 20KB of that is reserved for the bootloader. We’re trying to guarantee that at least 4KB of the 20KB of ram is available for you while running, and 100KB of the 128KB of storage is available for your applications.

The external flash is a 2MB module, and at least 1.5MB is available for your data, the first 500KB is reserved for keys, and factory reset images, and ota flashing and stuff.

There are some great SD card libraries, and even a microSD card shield sold by @kennethlimcp that can give you lots and lots more storage space, but current applications max out around 108KB on the current core.


Thanks for all the clarifications, by now I’m doing the primary hardware functions with the core, and processing my program’s main part ina server using the cloud service, as scsc_tech mentioned, but is also interesting knowing other alternatives for the future.

Thank you guys!!!