Micro SD Card issue

jack.fury413
Posts: 8
Joined: Thu Jul 06, 2017 5:01 pm

Micro SD Card issue

Postby jack.fury413 » Fri Jul 28, 2017 4:18 pm

Hi guys, I'm trying to use the micro SD card with SPI for my system (a ESP32 DevKit from doit)

I've followed the wiring diagram and used the provided example code from this link but failed to get the card to work.

I tried the following ways (with either Arduino IDE or platform IO on VisualCode):
1. Using the Micro SD card module
2. Wiring the Micro SD card directly to the ESP32 (via a SD card adapter)

None of them work and I always get the error when mounting the cards, the result is as follows:

Code: Select all

[W][sd_diskio.cpp:137] sdCommand(): no token received
[W][sd_diskio.cpp:137] sdCommand(): no token received
[W][sd_diskio.cpp:137] sdCommand(): no token received
[W][sd_diskio.cpp:479] ff_sd_initialize(): APP_OP_COND failed: 255
[E][sd_diskio.cpp:721] sdcard_mount(): f_mount failed 0x(3)
The platformio.ini file is:

Code: Select all

[env:esp32doit-devkit-v1]
platform = espressif32_stage
board = esp32doit-devkit-v1
framework = arduino
monitor_baud = 115200
I don't think the problem comes from the card because I tried with different ones.

So what should I do now to solve this?

Many thanks
Last edited by jack.fury413 on Sun Jul 30, 2017 2:39 am, edited 2 times in total.

jack.fury413
Posts: 8
Joined: Thu Jul 06, 2017 5:01 pm

Re: Micro SD Card issue

Postby jack.fury413 » Sat Jul 29, 2017 7:25 pm

Update:
I've tested with another new card (SanDisk SDHC1), the older ones are SDHC.
The new card works like a charm.
Not sure if this is a bug in the library ???

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Micro SD Card issue

Postby WiFive » Sat Jul 29, 2017 9:19 pm

Were the cards all formatted the same? There is a recent change: https://github.com/espressif/esp-idf/co ... 76c5c14e22 but not sure if it lines up with your error

jack.fury413
Posts: 8
Joined: Thu Jul 06, 2017 5:01 pm

Re: Micro SD Card issue

Postby jack.fury413 » Sun Jul 30, 2017 2:48 am

WiFive wrote:Were the cards all formatted the same? There is a recent change: https://github.com/espressif/esp-idf/co ... 76c5c14e22 but not sure if it lines up with your error
I can confirm that all the cards are formatted as FAT32 using File Explorer on Windows 10, with allocation size set to 32KB.
I'm using the SPI library (not SD_MMC), so I don't think that it would take effect on my issue ?
Btw, this is the version of esp-arduino that I'm using.

jack.fury413
Posts: 8
Joined: Thu Jul 06, 2017 5:01 pm

Re: Micro SD Card issue

Postby jack.fury413 » Mon Jul 31, 2017 1:54 pm

Is there any help ???

kuchbhi
Posts: 3
Joined: Tue Sep 12, 2017 12:05 pm

Re: Micro SD Card issue

Postby kuchbhi » Tue Sep 12, 2017 12:11 pm

I am facing the same issue with a doit board, 16Gb Samsung Micro SD card via a breakout board. Did you figure out the issue? Any help appreciated

MISO -> 19
MOSI -> 23
SCK -> 18
CS -> 5/21 (Neither works)

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (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:0x3fff0010,len:4
load:0x3fff0014,len:588
load:0x40078000,len:0
load:0x40078000,len:9768
entry 0x400789b8
Card Mount Failed

Thanks,
-kuch

Who is online

Users browsing this forum: No registered users and 67 guests