Big DMA RAM Savings - More RAM available for other Libraries

A project log for SmartMatrix Library ESP32 Port

Port of the SmartMatrix Library to the ESP32. FastLED patterns and Animated GIFs on large LED matrix panels, now with WiFi!

Louis BeaudoinLouis Beaudoin 05/17/2018 at 11:040 Comments

Big progress today in reducing the amount of DMA RAM used by the SmartMatrix Library: the RAM required for holding the I2S data is cut in half by changing I2S to 8-bit mode and storing each clock's data in 8 bits instead of 16.  For a 64x64 32-bit panel, the refresh buffer used to take 99kB of RAM, and now takes 49.5kB.  This only works with the SmartMatrix Shield (circuit) as there's an external latch used to reduce the number of GPIO needed for the I2S data down to 8.

This DMA RAM savings should hopefully allow for more applications that use WiFi and other peripherals to work with the SmartMatrix Library.  I have a sketch that uses WiFi to get the time and the SD library to play Animated GIFs, and it was too much RAM to drive a 64x64 panel even with only 24-bit color before.  Now it works with 64x64 and 36-bit color.