-
Notifications
You must be signed in to change notification settings - Fork 178
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
Memory footprint of epd_init() #68
Comments
Hi, |
Beating a somewhat dead horse here - I'm trying to minimize energy consumption of a run cycle in between deep sleep, and I found that enabling PSRAM adds ~800ms to the boot time, which is about 1/3 of the entire runtime. If I only need black & white (I'm experimenting with Lilygo FWIW), and Thanks! |
You can, using the low-level api: https://github.com/vroland/epdiy/blob/master/src/epd_driver/include/epd_driver.h#L136 as a starting point. This packs 8 pixels in one bye. I don't have an example for this mode though, and haven't used it in a long time... |
@vroland thanks for a quick reply! I had high hopes ever since I noticed that flag, but couldn't figure out how to use it on all mentions I could find https://github.com/vroland/epdiy/search?q=MODE_PACKING_8PPB. Does it mean I'd have to re-implement all the primitive drawing functions, so that I can flip proper bits in the framebuffer? |
@ashald if you check the codebase a bit more you will realize that epd_hl_update_area uses MODE_PACKING_2PPB as default (exactly coherent with the slow mode you are using that is MODE_GC16). In order to use that 8PPB mode you will have to make your own function if I see that correctly and call epd_draw_base using that mode (There is no example so far I think). update: Will be nice to leave an example about 8PPB mode to understand better how to use and also add it in the documentation. As I understand even if you call an hl_update using MODE_PACKING_8PPB it adds it to the | (OR) mode concatenation, but if you try to use it "as is" you get a white screen. Updating this line in epd_hl_update_area:
to the MODE_PACKING_8PPB you can experiment how it is. You can use the Slack epdiy.slack.com channel to ask questions in different channels. |
@martinberlin thanks! Would appreciate if you could suggest a better place to ask such questions. One thing that I'm confused about is that it seems that the base drawing function for a single pixel is explicitly using 2-pixels-per-byte approach epdiy/src/epd_driver/epd_driver.c Line 87 in f3feb5a
|
Closing here, since there is no more feedback since mid-February, and does not seem a bug that can be solved with EPDiy. |
The issue was found while using LilyGO's port of the epdiy library for Arduino/ESP32:
https://github.com/Xinyuan-LilyGO/LilyGo-EPD47
However, is seems to be applicable for the 'master' library as well.
Ok. Let's add few debug print messages near epd_init() function, as follows:
This is a console output for the test above running on WROVER-E with 8 MB of PSRAM:
So, the epd_init() takes about 97 Kbytes of built-in ESP32 static RAM.
Is it good or bad? The answer depends on whether or not we gonna use other functions of the ESP32 SoC...
The space remaining is Ok to bring up Wi-Fi stack or Bluetooth, but not both. 😞
The epd_init() function code contains the following:
When we alter the line onto this (valid for built together with Arduino/ESP32) :
- it's getting much better now:
My sketch works fine to me when connversion LUT table is located in PSRAM. However, we yet need to:
The text was updated successfully, but these errors were encountered: