NXP MCU 技术论坛
直播中

李华瑞

8年用户 1019经验值
私信 关注
[问答]

esp32正在与sdcard通信,但拒绝设置命令怎么解决?

我在通过 SPI 连接到微型 SD 卡的 ESP32-Wroom-32E 模块上使用 idf.py v5.0.1。它通常适用于大多数 32GB micro sd 卡,但我有一个 micro sdcard 但它不能。SD 卡是 SanDisk Ultra 32GB HCI class 10 A1。我想知道这张卡是否不支持spi,或者这只是一个设置问题。

我打开调试,这就是我得到的:

I (1357) SDCard: Initializing SD card

I (1367) gpio: GPIO[13]| 输入En:0| 输出En:1| 开漏:0| 上拉:0| 下拉:0| Intr:0

V (1377) sdmmc_cmd: sending cmd slot=1 op=52 arg=80000c08 flags=1c00 data=0x0 blklen=0 datalen=0 timeout=1000

I (1387) sdspi_transaction: cmd=52, R1 response: command not支持

D (1387) sdmmc_cmd: cmd=52, sdmmc_req_run 返回 0x106

V(1397)sdmmc_cmd:发送 cmd slot=1 op=0 arg=0 flags=20 data=0x0 blklen=0 datalen=0 timeout=1000 V(1407)sdmmc_cmd:cmd 响应 00000000 00000000 00000000 00000000 err=0x0 state=

0

V(1437)sdmmc_cmd:发送 cmd slot=1 op=0 arg=0 flags=1c20 data=0x0 blklen=0 datalen=0 timeout=1000 V(1437)sdmmc_cmd:cmd 响应 00000001 00000000 00000000 00000000 err=0x0 state=

0

V (1457) sdmmc_cmd:发送 cmd slot=1 op=8 arg=1aa flags=1c30 data=0x0 blklen=0 datalen=0 timeout=1000 V (1457) sdmmc_cmd:cmd 响应 000001aa 00000000 00000000 00000000 err=0x0 state=

0

V (1457) sdmmc_cmd:发送 cmd slot=1 op=5 arg=0 flags=1030 data=0x0 blklen=0 datalen=0 timeout=1000 I (1467) sdspi_transaction:cmd=5,R1 响应:不支持

命令

D (1477) sdmmc_cmd:cmd=5,sdmmc_req_run 返回 0x106

V (1477) sdmmc_cmd:发送 cmd slot=1 op=59 arg=1 flags=1c00 data=0x0 blklen=0 datalen=0 timeout=1000 V (1487)

sdmmc_cmd :cmd 响应 00000001 00000000 00000000 00000000 err=0x0 state=0

V (1497) sdmmc_cmd:发送 cmd slot=1 op=55 arg=0 flags=1c00 data=0x0 blklen=0 datalen=0 timeout=1000

V (1507) sdmmc_cmd :cmd响应00000001 00000000 00000000 00000000 err=0x0 state=0

V (1517) sdmmc_cmd:发送cmd slot=1 op=41 arg=40ff8000 flags=1030 data=0x0 blklen=0 datalen=0 timeout=1000 V (15mmc_cmd) sdmmc_cmd:发送cmd slot=1 op=41 arg=40ff8000 flags=

1030 :命令响应 00000001 00000000 00000000 00000000 err=0x0 state=0

E (5007) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) 返回 0x107

D (5007) sdmmc_init: sdmmc_card_init: sdmmc_init_ocr 返回 0x107

E (5007) vfs_fat_sdmmc: sdmmc_card_init 失败 (0x107)。

我 (5017) gpio: GPIO[13]| 输入En: 1| 输出En:0| 开漏:0| 上拉:0| 下拉:0| Intr:0

E (5027) SDCard:初始化卡失败(ESP_ERR_TIMEOUT)。确保 SD 卡线路有上拉电阻。

ESP_ERROR_CHECK failed: esp_err_t 0x107 (ESP_ERR_TIMEOUT) at 0x400d9d10


似乎 spi 正常,esp32 正在与 sdcard 通信,但拒绝设置命令。

有没有人遇到过这个问题?

更多回帖

发帖
×
20
完善资料,
赚取积分