MabezDev / embedded-fatfs

36 stars 10 forks source link

Failed to init card on esp32s3 #38

Open marcfir opened 3 months ago

marcfir commented 3 months ago

I am trying to read a SD card with an esp32s3. But updating the example of the esp32c6 to esp32s3 just gives me

 Failed to init card, retrying...

Any ideas?

MabezDev commented 3 months ago

It's more than likely #29, could you try out https://github.com/MabezDev/embedded-fatfs/pull/30?

CBJamo commented 3 months ago

Out of curiosity, what's the model number of the sd card you're using?

marcfir commented 3 months ago

I haven't had time to test #30 yet, but the SD card is a SanDisk Ultra microSD 64GB A1 class 10. I formatted the card on Windows with a FAT32 partition.

CBJamo commented 2 months ago

FYI, I ordered that sdcard and a random esp32s3 board with an sd card socket to reproduce this.

CBJamo commented 2 months ago

@marcfir Can you provide a minimal failing example? That card works on the 2040 and 2350 boards I have. I got a esp32s3 board in, but a jumpstart on the code would be appreciated.

marcfir commented 2 months ago

Hi, sorry for coming back so late. Wow, thanks for working on this. I have published my minimal example here. This already includes #30 from yesterday, but with no effect. Running the example just gives me

INFO - Hello world!
INFO - Failed to init card, retrying...
INFO - Failed to init card, retrying...
INFO - Failed to init card, retrying...
INFO - Failed to init card, retrying...
INFO - Failed to init card, retrying...
INFO - Failed to init card, retrying...
INFO - Failed to init card, retrying...
INFO - Failed to init card, retrying...
INFO - Failed to init card, retrying...
INFO - Failed to init card, retrying...
MabezDev commented 2 months ago

I'll look into this shortly, as I will be trying to use this with an esp32s3 soon.

MabezDev commented 1 month ago

I managed to get it working in my project, but I needed a newer esp-hal rev, I'll retry your example when we release 0.22.0 this week.