New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for stacked coordinate layout (64x64 with 2x64x32 panels) in addition to side by side (128x32) #3
Comments
Hello. Can you see if adjusting the same lines as outlined in issue #6 resolves the issue? Given I had hard-coded this library to work on an ESP32 for a 64x32 (2048) pixel matrix, I had pretty much trial-and-error hard coded values that gave the best output (for my purposes). I think what is happening here is the ESP32 is simply out of memory (after I purposely force the library to keep 110k free etc.). |
I tried 50, 100, 150, 200 for
and they all crashed for 64 height. That said, I just wrote my own GFX library on top of SmartMatrix, so admittedly I don't need this anymore: |
Ah.. I'm not sure if vertically stacked panels will work with this library. I did set the WIDTH to 128 (i.e simple horizontal chain of panels) and it seemed to run. I'm thinking I might as well just port Louis's or your library and add DMA at some point. This library is 24 bit, but the test_shapes demo isn't the best guide to use. The plasma wave demo draws directly to the DMA buffer with 24 bit colour (i.e, doesn't go through the adafruit GFX library). This library doesn't have a framebuffer etc. It writes pixel updates directly to the only buffer - the DMA buffer, as such, memory usage is greatly reduced, at the expense of layering stuff etc. What type of ESP device are you using? |
@mrfaptastic interesting, so you do support 4096 pixels as long as they are 128x32 and not 64x64, so at least it's not a memory problem. For what you can do long term, I know Louis would be grateful to have your DMA support in his lib. I'm assuming it's less work to port your DMA code to his lib than his entire lib to your driver. SmartMatrix::GFX could be made to work on top of your library with minimal effort, but given that it crashes for me in 64x64 . ESP32, I'm using a bare chip with level shifters. Do you care which one exactly? |
Move malloc from static class constructor to begin(). Possible fix for #3
Try again now. I don't have access to a 64x64 panel, or own two 64 (wide) x 32 (high) panels to able to test chaining... but it seems to compile and run for 128 wide x 32 high, and 64 high x 64 wide, now.
Thank you. I'll take a look at this guide over the coming weekends. |
Assuming the above change works (given I can't test it), I should note (you would already know this though :-), if you're using a single 64x64 pixel panel, you'll need to assign a E_PIN I think for this library to work with it. If you're using 2 x 64*32 panels and sitting them on top of each other, this library isn't designed for that. You'll need to set the width to 128 and height to 32px in the library and in your animation code, do the necessary virtual co-ordinate mapping (i.e. if y > 32 then y = y - 32, x = x+64). |
I have both 64x64 with E address that I know your library doesn't support, and 64x32x2 chained but as 64x64, not 32x128. SmartMatrix supports 64x64 without changing my code to remap the pixels from 32x128, to 64x64, so I'll probably stick with that for now. |
Did my change not work? It's probably easier just use the smart matrix code. It would be easy to add support I think, but I can't as I don't have the physical panels to test. |
I'm in a plane and travelling for the next 3 days, so I may not have time to play with my panels for a little bit. |
I believe there is already a SmartMatrix experimental branch which uses the same DMA library. |
It adds support for ESP32 (not supported in the main branch), but I don't think it supports DMA. Louis is actually the person who told me to try your branch for DMA :) |
It's both ESP32 and DMA per his README. |
you are correct, my bad (was re-reading the wrong README). |
Ok, I was just able to confirm that 32x128 works like you suggested, while 64x64 crashes, so it's "just" a layout problem in the coordinate mapping like you suggested. |
Closed. |
Are stacked panels supported now? (64x64, not 32x128) |
woohoo, well done. |
pardon me, I try to use stacked chain with VirtualMatrixPanel class. but can't call flipDMABuffer() and showDMABuffer(). |
Can you post a video? You don't call flipDMABuffer etc via the virtualDisplay class, you need to call the underlying DMA class. i.e. dma_display.flipDMABuffer(); |
…ions/cache-3 Bump actions/cache from 2 to 3
I tried your library, it worked fine on my ESP32, thank you.
For 64x32 it just works.
That said, I have chained panels and would like to try 64x64 and ultimately 64x96 which does work with Louis' SmartMatrix already
I went in your library edited ESP32-RGB64x32MatrixPanel-I2S-DMA.h
#define MATRIX_HEIGHT 64
Once I do, I get this
23:24:18.962 -> Setting up parallel I2S bus at I2S1
23:24:18.963 -> I2S setup done.
23:24:18.964 -> Flushing buffer 0Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
0x400d12af: RGB64x32MatrixPanel_I2S_DMA::updateMatrixDMABuffer(short, short, unsigned char, unsigned char, unsigned char) at /home/merlin/Arduino/libraries/ESP32-RGB64x32MatrixPanel-I2S-DMA/ESP32-RGB64x32MatrixPanel-I2S-DMA.cpp line 266
0x400d0c11: RGB64x32MatrixPanel_I2S_DMA::flushDMAbuffer() at /home/merlin/Arduino/libraries/ESP32-RGB64x32MatrixPanel-I2S-DMA/ESP32-RGB64x32MatrixPanel-I2S-DMA.h line 233
0x400d0c5c: setup() at /home/merlin/Arduino/libraries/ESP32-RGB64x32MatrixPanel-I2S-DMA/ESP32-RGB64x32MatrixPanel-I2S-DMA.h line 182
0x400e5a77: loopTask(void*) at /home/merlin/Arduino/hardware/espressif/esp32/cores/esp32/main.cpp line 15
Details:
23:24:18.859 -> *****************************************************
23:24:18.861 -> HELLO !
23:24:18.862 -> *****************************************************
23:24:18.863 -> lsbMsbTransitionBit of 0 requires 198304 RAM, 113792 available, leaving -84512 free:
23:24:18.863 -> lsbMsbTransitionBit of 1 requires 149152 RAM, 113792 available, leaving -35360 free:
23:24:18.894 -> lsbMsbTransitionBit of 2 requires 124576 RAM, 113792 available, leaving -10784 free:
23:24:18.896 -> lsbMsbTransitionBit of 3 requires 112288 RAM, 113792 available, leaving 1504 free:
23:24:18.898 -> Raised lsbMsbTransitionBit to 3/7 to fit in RAM
23:24:18.898 -> ns per latch: 3200:
23:24:18.899 -> nsPerFrame: 3481600:
23:24:18.900 -> lsbMsbTransitionBit of 3 gives 287 Hz refresh:
23:24:18.925 -> Raised lsbMsbTransitionBit to 3/7 to meet minimum refresh rate
23:24:18.928 -> Descriptors for lsbMsbTransitionBit 3/7 with 32 rows require 12288 bytes of DMA RAM
23:24:18.930 -> SmartMatrix Mallocs Complete
23:24:18.930 -> Heap Memory Available: 367940 bytes total, 113792 bytes largest free block:
23:24:18.931 -> 8-bit Accessible Memory Available: 279436 bytes total, 113792 bytes largest free block:
23:24:18.933 -> 32-bit Memory Available: 367940 bytes total, 113792 bytes largest free block:
23:24:18.960 -> DMA Memory Available: 279436 bytes total, 113792 bytes largest free block:
23:24:18.961 -> Performing I2S setup.
23:24:18.962 -> Setting up parallel I2S bus at I2S1
23:24:18.963 -> I2S setup done.
23:24:18.964 -> Flushing buffer 0Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
23:24:18.964 -> Core 1 register dump:
23:24:18.965 -> PC : 0x400d12af PS : 0x00060730 A0 : 0x800d0c14 A1 : 0x3ffb1f10
23:24:18.993 -> A2 : 0x3ffc2420 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000002
23:24:18.995 -> A6 : 0x00000000 A7 : 0x00001f82 A8 : 0x00000002 A9 : 0x00000000
23:24:18.997 -> A10 : 0x00000000 A11 : 0x00000000 A12 : 0x00000001 A13 : 0x00000008
23:24:18.998 -> A14 : 0x00000002 A15 : 0x00000004 SAR : 0x00000020 EXCCAUSE: 0x0000001c
23:24:19.025 -> EXCVADDR: 0x00000002 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff
23:24:19.026 ->
23:24:19.027 -> Backtrace: 0x400d12af:0x3ffb1f10 0x400d0c11:0x3ffb1f60 0x400d0c5c:0x3ffb1f80 0x400e5a77:0x3ffb1fa0
23:24:19.028 ->
23:24:19.028 -> Rebooting...
The text was updated successfully, but these errors were encountered: