I can successfully use 64x96 with small code.
However, when I plugged SmartMatrix into bigger code, it runs out of RAM, but I’m not sure which one.
Will I be better off if I switch to teensy 3.6?
Going back to 64x64 works, and I can artificially go to 64x86 (which displays wrong, but is useful to debug memory use).
With that resolution, here is what I get:
I only use 2 layers:
const uint8_t kMatrixWidth = 64;
const uint8_t kMatrixHeight = 86;
const uint8_t kRefreshDepth = 24; // known working: 24, 36, 48
const uint8_t kDmaBufferRows = 2; // known working: 2-4, use 2 to save memory, more to keep from dropping frames and automatically lowering refresh rate
const uint8_t kMatrixOptions = (SMARTMATRIX_OPTIONS_NONE); // see http://docs.pixelmatix.com/SmartMatrix for options
const uint8_t kBackgroundLayerOptions = (SM_BACKGROUND_OPTIONS_NONE);
SMARTMATRIX_ALLOCATE_BUFFERS(matrixLayer, kMatrixWidth, kMatrixHeight, kRefreshDepth, kDmaBufferRows, kPanelType, kMatrixOptions);
SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER(backgroundLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kBackgroundLayerOptions);
and I have a 3rd 24bit array in which I render my pixels for compatibility with NeoMatrix.
I suppose I must use at least 2 layers, correct?
Starting SmartMatrix Mallocs
Heap Memory Available: 281636 bytes total, 113792 bytes largest free block:
8-bit Accessible Memory Available: 194284 bytes total, 113792 bytes largest free block:
32-bit Memory Available: 281636 bytes total, 113792 bytes largest free block:
DMA Memory Available: 194284 bytes total, 113792 bytes largest free block:
SmartMatrix Layers Allocated from Heap:
Heap Memory Available: 247096 bytes total, 113792 bytes largest free block:
Starting SmartMatrix DMA Mallocs
sizeof framestruct: 0000AC00
matrixUpdateFrames[0] pointer: 3FFE4374
matrixUpdateFrames[1] pointer: 3FFEEF84
Frame Structs Allocated from Heap:
Heap Memory Available: 157936 bytes total, 87352 bytes largest free block:
8-bit Accessible Memory Available: 70584 bytes total, 25696 bytes largest free block:
32-bit Memory Available: 157936 bytes total, 87352 bytes largest free block:
DMA Memory Available: 70584 bytes total, 25696 bytes largest free block:
Allocating refresh buffer:
DMA Memory Available: 70584 bytes total, 25696 bytes largest free block:
lsbMsbTransitionBit of 0 requires 49152 RAM, 25696 available, leaving -23456 free:
lsbMsbTransitionBit of 1 requires 24576 RAM, 25696 available, leaving 1120 free:
Raised lsbMsbTransitionBit to 1/7 to fit in RAM
lsbMsbTransitionBit of 1 gives 56 Hz refresh, 120 requested:
lsbMsbTransitionBit of 2 gives 111 Hz refresh, 120 requested:
lsbMsbTransitionBit of 3 gives 213 Hz refresh, 120 requested:
Raised lsbMsbTransitionBit to 3/7 to meet minimum refresh rate
Descriptors for lsbMsbTransitionBit 3/7 with 16 rows require 6144 bytes of DMA RAM
SmartMatrix Mallocs Complete
Heap Memory Available: 151760 bytes total, 87352 bytes largest free block:
8-bit Accessible Memory Available: 64408 bytes total, 25696 bytes largest free block:
32-bit Memory Available: 151760 bytes total, 87352 bytes largest free block:
DMA Memory Available: 64408 bytes total, 25696 bytes largest free block: