Esp32, SD card, lvgl


What MCU/Processor/Board and compiler are you using?


What do you want to achieve?

Initializing SD card and LVGL.

What have you tried so far?

I took the sample project from here, and add the SD card code from here.

Now I would like to combine the two codes.

The LVGL and the SD they got their own SPI init, which will lead to confliction and shows:

SPI bus already initialized.

Both of the sample codes works separately.

What is the solution?


You can use this sample if both display and SD card are on the same SPI bus.
set shared in LovyanGFX and use SD card without initializing the bus again.

1 Like

I have written examples of esp idf and arduino based on esp32s3,
You can find reference here:

Good luck!

1 Like


To any one who might face this issue, this can also be helpful: