We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e88ff4d commit fdec056Copy full SHA for fdec056
cores/esp32/esp32-hal-timer.c
@@ -36,7 +36,7 @@
36
#define HWTIMER_LOCK() portENTER_CRITICAL(timer->lock)
37
#define HWTIMER_UNLOCK() portEXIT_CRITICAL(timer->lock)
38
39
-typedef struct {
+typedef volatile struct {
40
union {
41
struct {
42
uint32_t reserved0: 10;
@@ -240,6 +240,12 @@ void timerEnd(hw_timer_t *timer){
240
}
241
242
void timerAttachInterrupt(hw_timer_t *timer, void (*fn)(void), bool edge){
243
+#if CONFIG_IDF_TARGET_ESP32
244
+ if(edge){
245
+ log_w("EDGE timer interrupt does not work properly on ESP32! Setting to LEVEL...");
246
+ edge = false;
247
+ }
248
+#endif
249
static bool initialized = false;
250
static intr_handle_t intr_handle = NULL;
251
if(intr_handle){
0 commit comments