CrowPanel ESP32 HMI 5.0-inch Display micropython more questions
Hi,
I want to run this display with Micropython (MP). Because I need to add the ulab module, I need to build MP from source code. Questions:
1. Can I use MP-current, or did Elecrow add any patches? If the latter, where do I find Elecrow's MP fork?
2. Which build target did Elecrow use? Would ESP32_GENERIC_S3 work with the proper settings for ROM and PSRAM?
3. Anything particular e.g. w.r.t pin numbering?
4. is the stock MP binary for the ESP32-S3 on this display already 64 bit floating point enabled? (in MP-latest, it is - see ports/esp32/mpconfigport.h )
5. Since the ESP32-S3 has 2 cores, will the TFT driver run on a core separate from the user program using Micropython?
Question w.r.t energy efficiency: Does the ESP core have to refresh the RGB display all the time or is data only written on changes?
The tutorial page says nothing about this.
Furthermore, can someone please post their working tft_config module for this part? It would be nifty if Elecrow could add it to the file CrowPanel-5.0-MicroPython.zip.
Thank you!
Comments
Hello @hmilz ,
We do provide the tft_config module, and there are two versions available. It's the program files that we provide these.
https://github.com/lvgl/lv_micropython/tree/master
We have compiled our version of Micropython using the aforementioned repository.
Please note that we use the esp-idf tool version 4.4.1 for our compilation process.
If you have any further questions or need additional support, feel free to reach out. We are here to assist you.
Needless to say I am referring to lv_micropython in my post above. Sadly, "This branch is 722 commits ahead of, 1767 commits behind micropython/micropython:master.".
Hi @hmilz ,
The LVGL + Micropython firmware is an official release designed specifically for using LVGL with Micropython.
Could you please clarify your requirements?
Here's the answer to some questions
1.Can I use MP-current, or did Elecrow add any patches? If the latter, where do I find Elecrow's MP fork?
The other modules you need to use can be imported into the mainboard by yourself first, importing the dht20 libraries as we did in our example program, or compile them directly into the firmware. The latter approach is more challenging and can be done following the official guidelines.
2.Which build target did Elecrow use? Would ESP32_GENERIC_S3 work with the proper settings for ROM and PSRAM?
Our firmware compilation process is tailored to the specific dimensions and requirements of different mainboards.
3.Anything particular e.g. w.r.t pin numbering?
There are no special requirements for pin numbering.
4.is the stock MP binary for the ESP32-S3 on this display already 64 bit floating point enabled? (in MP-latest, it is - see ports/esp32/mpconfigport.h )
Maybe it's not enabled, you can run it and try, ours is lvgl+micropython may not be the same version as micropython, not using the latest version.
5.Since the ESP32-S3 has 2 cores, will the TFT driver run on a core separate from the user program using Micropython?
The ESP32-S3's dual-core capability allows for the TFT driver to operate on a separate core from the user program running Micropython.
6.w.r.t energy efficiency
The display does not need to be constantly refreshed.
7.We do provide a version of the firmware that includes the tft_config library. The companion program file contains
Please let us know if these points address your requirements or if you need further assistance.
Thank you for your help! I have indeed some further questions.
Yes - as I wrote above, I need to add ulab to the image, and potentially patch and rebuild MP to fully support FP64 (something which I did with Circuitpython this spring for the Adafruit Feather M4 Express, Adafruit RP2040, UM Feather S2 and Teensy 4.0 targets). As it seems, in the stock lv_micropython repo, MICROPY_OBJ_REPR_A is set for ESP32-S3, but MICROPY_FLOAT_IMPL_DOUBLE is not, and I remember enabling it caused a number of compilation errors because various defines and variable types did not match. Not a big issue because I can pretty much replicate my CP diff.
I'm talking about the 5.0 inch HMI board. Which build target did you use for this? GENERIC_S3 or GENERIC_S3_SPIRAM or GENERIC_S3_SPIRAM_OCT, or anything else?
Does "allow" mean it can be done by reconfiguring and recompiling the image, or does the image (respectively, LVGL) do this as-is? I think one needs to do this in the user code, for example, by running lv.task_handler() in a dedicated FreeRTOS task on Core 1 for display management.
Thank you!
Hello @hmilz ,
Q:I'm talking about the 5.0 inch HMI board. Which build target did you use for this? GENERIC_S3 or GENERIC_S3_SPIRAM or GENERIC_S3_SPIRAM_OCT, or anything else?
A:Generic ESP32-S3 (SPIRAM)
Q:Does "allow" mean it can be done by reconfiguring and recompiling the image, or does the image (respectively, LVGL) do this as-is? I think one needs to do this in the user code, for example, by running lv.task_handler() in a dedicated FreeRTOS task on Core 1 for display management.
A:The images (LVGL, respectively) can be implemented as-is