mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
fix(spi_flash): fixed no_os flash API not consider branch predictor on c5/c61
This commit is contained in:
parent
49826c241b
commit
8c8f8836e5
@ -9,6 +9,7 @@
|
|||||||
#include "esp_flash.h"
|
#include "esp_flash.h"
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
#include "esp_rom_sys.h"
|
#include "esp_rom_sys.h"
|
||||||
|
#include "esp_cpu.h"
|
||||||
#include "rom/cache.h"
|
#include "rom/cache.h"
|
||||||
#include "hal/cache_hal.h"
|
#include "hal/cache_hal.h"
|
||||||
#include "hal/cache_ll.h"
|
#include "hal/cache_ll.h"
|
||||||
@ -16,6 +17,11 @@
|
|||||||
|
|
||||||
static IRAM_ATTR esp_err_t start(void *arg)
|
static IRAM_ATTR esp_err_t start(void *arg)
|
||||||
{
|
{
|
||||||
|
#if SOC_BRANCH_PREDICTOR_SUPPORTED
|
||||||
|
//branch predictor will start cache request as well
|
||||||
|
esp_cpu_branch_prediction_disable();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if CONFIG_IDF_TARGET_ESP32
|
#if CONFIG_IDF_TARGET_ESP32
|
||||||
Cache_Read_Disable(0);
|
Cache_Read_Disable(0);
|
||||||
Cache_Read_Disable(1);
|
Cache_Read_Disable(1);
|
||||||
@ -35,6 +41,10 @@ static IRAM_ATTR esp_err_t end(void *arg)
|
|||||||
cache_hal_resume(CACHE_LL_LEVEL_EXT_MEM, CACHE_TYPE_ALL);
|
cache_hal_resume(CACHE_LL_LEVEL_EXT_MEM, CACHE_TYPE_ALL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if SOC_BRANCH_PREDICTOR_SUPPORTED
|
||||||
|
esp_cpu_branch_prediction_enable();
|
||||||
|
#endif
|
||||||
|
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user