关于esp32使用tf卡的异常请教

xuankong
Posts: 5
Joined: Wed Jul 10, 2024 11:44 am

关于esp32使用tf卡的异常请教

Postby xuankong » Mon Aug 26, 2024 5:15 am

我打了一块验证TF的pcb,d0,d1,d2,d3,clk,cmd都10k上拉:

但是通过1线sdmmc尝试访问tf卡的时候始终报错如下:
  1. [0;32mI (31) boot: ESP-IDF 5.3.0 2nd stage bootloader␛[0m
  2. ␛[0;32mI (31) boot: compile time Aug 24 2024 12:28:04␛[0m
  3. ␛[0;32mI (31) boot: Multicore bootloader␛[0m
  4. ␛[0;32mI (35) boot: chip revision: v1.0␛[0m
  5. ␛[0;32mI (39) boot.esp32: SPI Speed      : 40MHz␛[0m
  6. ␛[0;32mI (43) boot.esp32: SPI Mode       : DIO␛[0m  
  7. ␛[0;32mI (48) boot.esp32: SPI Flash Size : 4MB␛[0m  
  8. ␛[0;32mI (52) boot: Enabling RNG early entropy source...␛[0m
  9. ␛[0;32mI (58) boot: Partition Table:␛[0m
  10. ␛[0;32mI (61) boot: ## Label            Usage          Type ST Offset   Length␛[0m  
  11. ␛[0;32mI (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000␛[0m
  12. ␛[0;32mI (76) boot:  1 phy_init         RF data          01 01 0000f000 00001000␛[0m
  13. ␛[0;32mI (84) boot:  2 factory          factory app      00 00 00010000 00100000␛[0m
  14. ␛[0;32mI (91) boot: End of partition table␛[0m
  15. ␛[0;32mI (95) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=0cef4h ( 52980) map␛[0m
  16. ␛[0;32mI (122) esp_image: segment 1: paddr=0001cf1c vaddr=3ffb0000 size=023f8h (  9208) load␛[0m
  17. ␛[0;32mI (126) esp_image: segment 2: paddr=0001f31c vaddr=40080000 size=00cfch (  3324) load␛[0m
  18. ␛[0;32mI (129) esp_image: segment 3: paddr=00020020 vaddr=400d0020 size=24754h (149332) map␛[0m
  19. ␛[0;32mI (187) esp_image: segment 4: paddr=0004477c vaddr=40080cfc size=0c004h ( 49156) load␛[0m
  20. ␛[0;32mI (213) boot: Loaded app from partition at offset 0x10000␛[0m
  21. ␛[0;32mI (213) boot: Disabling RNG early entropy source...␛[0m      
  22. ␛[0;32mI (225) cpu_start: Multicore app␛[0m
  23. ␛[0;32mI (234) cpu_start: Pro cpu start user code␛[0m
  24. ␛[0;32mI (234) cpu_start: cpu freq: 160000000 Hz␛[0m
  25. ␛[0;32mI (234) app_init: Application information:␛[0m
  26. ␛[0;32mI (237) app_init: Project name:     sdtestv3␛[0m
  27. ␛[0;32mI (242) app_init: App version:      1␛[0m
  28. ␛[0;32mI (246) app_init: Compile time:     Aug 24 2024 12:24:48␛[0m
  29. ␛[0;32mI (252) app_init: ELF file SHA256:  5d0b670ae...␛[0m
  30. ␛[0;32mI (257) app_init: ESP-IDF:          5.3.0␛[0m
  31. ␛[0;32mI (262) efuse_init: Min chip rev:     v0.0␛[0m
  32. ␛[0;32mI (267) efuse_init: Max chip rev:     v3.99 ␛[0m
  33. ␛[0;32mI (272) efuse_init: Chip rev:         v1.0␛[0m
  34. ␛[0;32mI (277) heap_init: Initializing. RAM available for dynamic allocation:␛[0m
  35. ␛[0;32mI (284) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM␛[0m
  36. ␛[0;32mI (290) heap_init: At 3FFB2D60 len 0002D2A0 (180 KiB): DRAM␛[0m
  37. ␛[0;32mI (296) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM␛[0m
  38. ␛[0;32mI (302) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM␛[0m
  39. ␛[0;32mI (309) heap_init: At 4008CD00 len 00013300 (76 KiB): IRAM␛[0m
  40. ␛[0;32mI (316) spi_flash: detected chip: generic␛[0m
  41. ␛[0;32mI (320) spi_flash: flash io: dio␛[0m
  42. ␛[0;32mI (324) main_task: Started on CPU0␛[0m
  43. ␛[0;32mI (334) main_task: Calling app_main()␛[0m
  44. ␛[0;32mI (334) example: Initializing SD card␛[0m
  45. ␛[0;32mI (334) example: Using SDMMC peripheral␛[0m
  46. ␛[0;32mI (334) example: Mounting filesystem␛[0m
  47. ␛[0;31mE (364) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107␛[0m
  48. ␛[0;31mE (364) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).␛[0m
  49. ␛[0;31mE (364) example: Failed to initialize the card (ESP_ERR_TIMEOUT). Make sure SD card lines have pull-up resistors in place.␛[0m
  50. ␛[0;32mI (384) main_task: Returned from app_main()␛[0m
我通过vspi的方式是可以访问tf卡的,但是sdmmc方式,不论是1线还是4线都不行
电路上面已经经过如下尝试:
1,d0,d1,d2,d3,clk,cmd 全上拉;
2,clk不上拉,其他上拉;

连接线也是检查好多天了

折腾好多天了,实在想搞明白是怎么回事,谢谢,期待有个回复。

xuankong
Posts: 5
Joined: Wed Jul 10, 2024 11:44 am

Re: 关于esp32使用tf卡的异常请教

Postby xuankong » Wed Aug 28, 2024 10:59 am

换成了s3 ,1线sdmmc方式可以读取 tf卡了,但是esp32 版本怎么都不行,所以这个问题到底是发生了啥?
目前看来同我的tf 的pcb上的电阻是否上下拉没有关系的。

Who is online

Users browsing this forum: No registered users and 173 guests