Kconfig.spiram 3.2 KB

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