mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
spiram: expose function to initialize SPI RAM cache
Some frameworks based on ESP-IDF need to be able to decide whether to initialize SPI RAM after the application has started. This change splits out part of esp_spiram_init which manipulate cache MMU into a separate function. Applications can disable cache, call esp_spiram_init_cache, re-enable cache, and then call esp_spiram_init. Disabling and re-enabling the cache can be achieved using functions provided in esp_spi_flash.h.
This commit is contained in:
@@ -27,6 +27,17 @@
|
||||
*/
|
||||
esp_err_t esp_spiram_init();
|
||||
|
||||
/**
|
||||
* @brief Configure Cache/MMU for access to external SPI RAM.
|
||||
*
|
||||
* Normally this function is called from cpu_start, if CONFIG_SPIRAM_BOOT_INIT
|
||||
* option is enabled. Applications which need to enable SPI RAM at run time
|
||||
* can disable CONFIG_SPIRAM_BOOT_INIT, and call this function later.
|
||||
*
|
||||
* @attention this function must be called with flash cache disabled.
|
||||
*/
|
||||
void esp_spiram_init_cache();
|
||||
|
||||
|
||||
/**
|
||||
* @brief Memory test for SPI RAM. Should be called after SPI RAM is initialized and
|
||||
@@ -76,4 +87,4 @@ void esp_spiram_writeback_cache();
|
||||
esp_err_t esp_spiram_reserve_dma_pool(size_t size);
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user