Kconfig.spiram 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. config SPIRAM
  2. bool "Support for external, SPI-connected RAM"
  3. default "n"
  4. help
  5. This enables support for an external SPI RAM chip, connected in parallel with the
  6. main SPI flash chip.
  7. menu "SPI RAM config"
  8. depends on SPIRAM
  9. choice SPIRAM_MODE
  10. prompt "Mode (QUAD/OCT) of SPI RAM chip in use"
  11. default SPIRAM_MODE_QUAD
  12. config SPIRAM_MODE_QUAD
  13. bool "Quad Mode PSRAM"
  14. config SPIRAM_MODE_OCT
  15. bool "Octal Mode PSRAM"
  16. endchoice
  17. choice SPIRAM_TYPE
  18. prompt "Type of SPIRAM chip in use"
  19. default SPIRAM_TYPE_AUTO
  20. config SPIRAM_TYPE_AUTO
  21. bool "Auto-detect"
  22. config SPIRAM_TYPE_ESPPSRAM16
  23. bool "ESP-PSRAM16 or APS1604"
  24. depends on SPIRAM_MODE_QUAD
  25. config SPIRAM_TYPE_ESPPSRAM32
  26. bool "ESP-PSRAM32"
  27. depends on SPIRAM_MODE_QUAD
  28. config SPIRAM_TYPE_ESPPSRAM64
  29. bool "ESP-PSRAM64 , LY68L6400 or APS6408"
  30. endchoice
  31. config SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY
  32. bool "Allow external memory as an argument to xTaskCreateStatic"
  33. default y
  34. help
  35. Accessing memory in SPIRAM has certain restrictions, so task stacks allocated by xTaskCreate
  36. are by default allocated from internal RAM.
  37. This option allows for passing memory allocated from SPIRAM to be passed to xTaskCreateStatic.
  38. This should only be used for tasks where the stack is never accessed while the cache is disabled.
  39. Cannot be used together with ESP_COREDUMP_ENABLE_TO_FLASH.
  40. menu "PSRAM Clock and CS IO for ESP32S3"
  41. depends on SPIRAM
  42. config DEFAULT_PSRAM_CLK_IO
  43. int "PSRAM CLK IO number"
  44. range 0 33
  45. default 30
  46. help
  47. The PSRAM Clock IO can be any unused GPIO, please refer to your hardware design.
  48. config DEFAULT_PSRAM_CS_IO
  49. int "PSRAM CS IO number"
  50. range 0 33
  51. default 26
  52. help
  53. The PSRAM CS IO can be any unused GPIO, please refer to your hardware design.
  54. endmenu
  55. config SPIRAM_FETCH_INSTRUCTIONS
  56. bool "Cache fetch instructions from SPI RAM"
  57. default n
  58. help
  59. If enabled, instruction in flash will be copied into SPIRAM.
  60. If SPIRAM_RODATA also enabled, you can run the instruction when erasing or programming the flash.
  61. config SPIRAM_RODATA
  62. bool "Cache load read only data from SPI RAM"
  63. default n
  64. help
  65. If enabled, rodata in flash will be copied into SPIRAM.
  66. If SPIRAM_FETCH_INSTRUCTIONS is also enabled,
  67. you can run the instruction when erasing or programming the flash.
  68. choice SPIRAM_SPEED
  69. prompt "Set RAM clock speed"
  70. default SPIRAM_SPEED_40M
  71. help
  72. Select the speed for the SPI RAM chip.
  73. config SPIRAM_SPEED_120M
  74. depends on SPIRAM_MODE_QUAD
  75. bool "120MHz clock speed"
  76. config SPIRAM_SPEED_80M
  77. bool "80MHz clock speed"
  78. config SPIRAM_SPEED_40M
  79. bool "40Mhz clock speed"
  80. endchoice
  81. config SPIRAM_SPEED
  82. int
  83. default 120 if SPIRAM_SPEED_120M
  84. default 80 if SPIRAM_SPEED_80M
  85. default 40 if SPIRAM_SPEED_40M
  86. source "$IDF_PATH/components/esp_psram/Kconfig.spiram.common" # insert non-chip-specific items here
  87. endmenu