Hello
I can’t conect to my SD card with lv_spi and lvdisplay running in the same SPI bus.
I am running :
spi = lv_spi.SPI(mosi=23, miso=19, clk=18)
sd = sdcard.SDCard(spi, machine.Pin(5))
os.mount(sd, “/sd”)
print(os.listdir(’/sd’))
And it works …
rst:0xc (SW_CPU_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4348
load:0x40078000,len:12384
load:0x40080400,len:3432
entry 0x40080610
[‘SD_VIDEO’, ‘DCIM’, ‘MISC’, ‘System Volume Information’]
MicroPython v1.18-601-g01f31ac23-dirty on 2022-09-11; ESP32 module (spiram) with ESP32
Type “help()” for more information.
but if I run this:
disp = ili9341()
touch=xpt2046(inverted = True)
obj=lv.scr_act()
sd = sdcard.SDCard(lv_spi.SPI(), machine.Pin(5))
os.mount(sd, “/sd”)
print(os.listdir(’/sd’))
I get and error …
ILI9341 initialization completed
Traceback (most recent call last):
File “main.py”, line 15, in
File “sdcard.py”, line 54, in init
File “sdcard.py”, line 87, in init_card
File “sdcard.py”, line 135, in init_card_v2
OSError: timeout waiting for v2 card
MicroPython v1.18-601-g01f31ac23-dirty on 2022-09-11; ESP32 module (spiram) with ESP32
Type “help()” for more information.
Any help please …