Code for Sleep mode (MCU Sleep vs Display Sleep)

Hi,

I am running lvgl code on ESP IDE for WT32-SC01 Plus Touch LCD which has a ESP32 S3 MCU.
I have been looking for an example code for how to put the system to sleep.
As far as I understand there are 2 different things:

1- Putting the whole MCU to sleep after some inactivity time and once you touch the lcd it would wake up
2- Turning off the display after some inactivity time and once you touch the lcd it would wake up

I have my ESP32 lcd board communicate with other systems via RS485 and sometimes I also save logs on the SD card on the same board.

  • Is number 1 type of sleep going to affect the other functionalities of my system (RS485 and SD card)?
  • I do have checked the LVGL documentation for sleep management but not able to implement it as it is confusing to me. Can anyone help me with an example code that implements either of the sleep modes mentioned above?

Thanks