用SPI模式读写SD卡

xielingy
Posts: 14
Joined: Tue Oct 27, 2020 3:47 am

用SPI模式读写SD卡

Postby xielingy » Sat Jul 10, 2021 3:00 am

使用ESP32-idf\examples\storage\sd_card中的SPI模式读写SD卡,串口返回的信息如下:

I (0) cpu_start: App cpu up.
I (261) heap_init: Initializing. RAM available for dynamic allocation:
I (268) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (274) heap_init: At 3FFB2A28 len 0002D5D8 (181 KiB): DRAM
I (280) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (287) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (293) heap_init: At 4008AB80 len 00015480 (85 KiB): IRAM
I (299) cpu_start: Pro cpu start user code
I (317) spi_flash: detected chip: generic
I (318) spi_flash: flash io: dio
I (318) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (326) example: Initializing SD card
I (326) example: Using SPI peripheral
I (336) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (346) sdspi_transaction: cmd=52, R1 response: command not supported
I (396) sdspi_transaction: cmd=5, R1 response: command not supported

E (426) sdmmc_sd: sdmmc_check_scr: send_scr returned 0x109
I (426) gpio: GPIO[15]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (426) gpio: GPIO[2]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (436) gpio: GPIO[14]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (446) gpio: GPIO[13]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
E (456) example: Failed to initialize the card (ESP_ERR_INVALID_CRC). Make sure SD card lines have pull-up resistors in
我使用的是ESP_WROVER_KIT_V4.1开发板,看开发板的电路图是有接上拉电阻的,但是使用SD modes OK。

ESP_Yake
Posts: 109
Joined: Mon Mar 06, 2017 12:23 pm

Re: 用SPI模式读写SD卡

Postby ESP_Yake » Wed Jul 14, 2021 10:05 am

Hi, 非常抱歉这么晚才回复,请问你是基于哪个版本测试的,我需要验证一下

Who is online

Users browsing this forum: No registered users and 94 guests