我正在使用ESP32-PICO-KIT_V4.1 板子外挂8M的PSRAM,IO按参考设计接法如下:
psram_pin1(CS):-->esp32 gpio10
psram_pin2(SO/SIO1):-->esp32 gpio17
psram_pin3(SIO2):-->esp32 gpio7
psram_pin4:-->gnd
psram_pin5(SI/SIO0):-->esp32 gpio8
psram_pin6(SCLK):-->esp32 gpio6
psram_pin7(SIO3):-->esp32 gpio11
spiram_psram.c文件中修改引脚定义如下:
#define PSRAM_SPIQ_SD0_IO 17
#define PSRAM_SPID_SD1_IO 8
#define PSRAM_SPIWP_SD3_IO 7
#define PSRAM_SPIHD_SD2_IO 11
idf版本:
v3.3.2-270-gf4333c8e3
编译工程示例:hello_world
menuconfig 中打开SPI RAM 支持,配置CS为gpio10
出现的错误log如下:
I (221) boot: Loaded app from par
tition at offset 0x10000
I (221) boot: Disabling RNG early entropy source...
I (222) psram:This chip is ESP32-PICO
I (251) spiram: Found 64MBit SPI RAM device
I (259) spiram: SPI RAM mode: flash 40m sram 40m
I (265) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (272) cpu_start: Pro cpu up.
I (276) cpu_start: Application information:
I (280) cpu_start: Project name: esp-idf
I (285) cpu_start: App version: 1
I (290) cpu_start: Compile time: Jul 13 2020 19:39:43
I (296) cpu_start: ELF file SHA256: f4ac9b655859d1b3...
I (302) cpu_start: ESP-IDF: v3.3.2-270-gf4333c8e3
I (308) cpu_start: Starting app cpu, entry point is 0x40081200
0x40081200: call_start_cpu1 at /home/szth/esp/esp-
idf/components/esp32/cpu_start.c:268
I (295) cpu_start: App cpu up.
E (1210) spiram: SPI SRAM memory test fail. 50461/131072 writes failed,
first @ 3F800040
E (1211) cpu_start: External RAM failed memory test!
abort() was called at PC 0x4008143a on core 0
看上去好像检测到psram了,但是为什么会出现test fail呢?各位帮忙看看,多谢!