mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-25 09:42:35 +00:00
global: Uses CCOUNT API instead of XTHAL macro
This commit is contained in:
@@ -29,14 +29,13 @@
|
||||
#include "soc/cpu.h"
|
||||
#include "soc/dport_reg.h"
|
||||
#include "soc/spi_periph.h"
|
||||
#include "hal/cpu_hal.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "freertos/queue.h"
|
||||
|
||||
#include "xtensa/core-macros.h"
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#ifndef CONFIG_FREERTOS_UNICORE
|
||||
@@ -78,7 +77,7 @@ void IRAM_ATTR esp_dport_access_stall_other_cpu_start(void)
|
||||
int cpu_id = xPortGetCoreID();
|
||||
|
||||
#ifdef DPORT_ACCESS_BENCHMARK
|
||||
ccount_start[cpu_id] = XTHAL_GET_CCOUNT();
|
||||
ccount_start[cpu_id] = cpu_hal_get_cycle_count();
|
||||
#endif
|
||||
|
||||
if (dport_access_ref[cpu_id] == 0) {
|
||||
@@ -135,7 +134,7 @@ void IRAM_ATTR esp_dport_access_stall_other_cpu_end(void)
|
||||
}
|
||||
|
||||
#ifdef DPORT_ACCESS_BENCHMARK
|
||||
ccount_end[cpu_id] = XTHAL_GET_CCOUNT();
|
||||
ccount_end[cpu_id] = cpu_hal_get_cycle_count();
|
||||
ccount_margin[cpu_id][ccount_margin_cnt] = ccount_end[cpu_id] - ccount_start[cpu_id];
|
||||
ccount_margin_cnt = (ccount_margin_cnt + 1)&(DPORT_ACCESS_BENCHMARK_STORE_NUM - 1);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user