This heap is too large (320 64 2 = 40960), so that sometimes the esp32 does not have a large enough free block (the same size of DMA memory is applied for when the spi writes to the screen), which will cause memory overflow, and sometimes will not cause the esp32 to stop. Will produce some unexpected behavior, I encountered this problem in a project
It is recommended to set it to LV_HOR_RES_MAX * 32, the disadvantage is that it may cause lvgl to refresh the screen more slowly
This heap is too large (320 64 2 = 40960), so that sometimes the esp32 does not have a large enough free block (the same size of DMA memory is applied for when the spi writes to the screen), which will cause memory overflow, and sometimes will not cause the esp32 to stop. Will produce some unexpected behavior, I encountered this problem in a project
It is recommended to set it to LV_HOR_RES_MAX * 32, the disadvantage is that it may cause lvgl to refresh the screen more slowly
https://github.com/m5stack/Core2-for-AWS-IoT-EduKit/blob/048feaa5a32dee024b71ae122febe46caa1b04bf/Getting-Started/components/core2forAWS/tft/disp_driver.h#L23