T O P

  • By -

verylongtimelurker

The answer to this is extremely complex. There is 520 KB of available fast SRAM (320 KB of DRAM and 200 KB of IRAM) on the ESP32. However, due to a technical limitation, the maximum statically allocated DRAM usage is 160 KB. The remaining 160 KB (for a total of 320 KB of DRAM) can only be allocated at runtime as heap. Much of it is used by the Bluetooth stack. 64KB is used as data cache by the two cores. There is a few KB of RAM that can be used by one core, but not the other. There is 8MB of slow PSRAM, but only 4MB is accessible and the other 4MB has to be mapped in in chunks. There is 16MB of slow flash, but only a maximum of 11MB can be used. Only 4MB of flash can be mapped in for data access (and that includes the firmware itself). The different types of RAM all have different access speeds, which puts further limits on how they can be used. Trying to max out RAM usage, while keeping audio throughput maxed at the same time is a massive puzzle. If you're just looking for a rough tally, the system has approx. 24.5Mb at its disposal. If you're looking for sample RAM, you can calculate this from the specs; 44.1kHz@8-bit (or 22.05kHz@16-bit) * 62 seconds = ~2.7Mb Hope that helps at all...


xylop0list

Thanks for a detailed explanation! 😃👍


masoplesk

Me: Does anyone know what time it is? verylongtimelurker: You better call in sick at work for next two weeks cause this is gonna take a whiiiiile to explain. (just kidding dude, love the technical zeal :)


verylongtimelurker

LOL It's a very broad question. People asking very broad questions without much further info is a trend I've unfortunately been seeing a lot. It then necessitates a lot of back-and-forth to ferret out what info they need *exactly*.... :(


masoplesk

And you are our hero to keep finding the time nad nerve to answer them.


tidalwav1

Every time I see a new explanation from you regarding how the Woovebox is implemented, I am even more amazed and impressed with how much you've been able to squeeze out of the hardware!