Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 82161be

Browse filesBrowse files
committed
Use cpu_hal_get_cycle_count for all chips
1 parent 55b8f67 commit 82161be
Copy full SHA for 82161be

File tree

Expand file treeCollapse file tree

1 file changed

+2
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-10
lines changed

‎cores/esp32/Esp.h

Copy file name to clipboardExpand all lines: cores/esp32/Esp.h
+2-10Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222

2323
#include <Arduino.h>
2424
#include <esp_partition.h>
25-
#ifndef CONFIG_IDF_TARGET_ESP32 // Broken in IDF 20210417
26-
#include <hal/systimer_hal.h>
27-
#endif
25+
#include <hal/cpu_hal.h>
2826

2927
/**
3028
* AVR macros for WDT managment
@@ -113,13 +111,7 @@ class EspClass
113111

114112
uint32_t ARDUINO_ISR_ATTR EspClass::getCycleCount()
115113
{
116-
uint32_t ccount;
117-
#ifdef CONFIG_IDF_TARGET_ESP32
118-
__asm__ __volatile__("esync; rsr %0,ccount":"=a" (ccount));
119-
#else // This should work on ESP32 once the hal is complete
120-
ccount = systimer_hal_get_counter_value(SYSTIMER_COUNTER_0);
121-
#endif
122-
return ccount;
114+
return cpu_hal_get_cycle_count();
123115
}
124116

125117
extern EspClass ESP;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.