diff --git a/Sming/Arch/Esp32/Components/driver/hw_timer.cpp b/Sming/Arch/Esp32/Components/driver/hw_timer.cpp index 9b5cc202dc..8ab470c5b0 100644 --- a/Sming/Arch/Esp32/Components/driver/hw_timer.cpp +++ b/Sming/Arch/Esp32/Components/driver/hw_timer.cpp @@ -62,7 +62,8 @@ class TimerConfig #else int source = timer_group_periph_signals.groups[group].timer_irq_id[index]; #endif - esp_intr_alloc_intrstatus(source, ESP_INTR_FLAG_IRAM, status_reg, mask, timerIsr, this, &isr_handle); + esp_intr_alloc_intrstatus(source, ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_INTRDISABLED, status_reg, mask, timerIsr, + this, &isr_handle); clear_intr_status(); enable_intr(true); } diff --git a/Sming/Arch/Esp32/Components/driver/include/driver/hw_timer.h b/Sming/Arch/Esp32/Components/driver/include/driver/hw_timer.h index 8f2a7e2ccd..1979b45072 100644 --- a/Sming/Arch/Esp32/Components/driver/include/driver/hw_timer.h +++ b/Sming/Arch/Esp32/Components/driver/include/driver/hw_timer.h @@ -147,6 +147,7 @@ uint32_t hw_timer1_read(void); __forceinline static uint32_t hw_timer2_read(void) { #if CONFIG_ESP_TIMER_IMPL_TG0_LAC + REG_WRITE(TIMG_LACTUPDATE_REG(0), 1); return REG_READ(TIMG_LACTLO_REG(0)); #elif ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0) systimer_ll_counter_snapshot(&SYSTIMER, 0); diff --git a/Sming/Core/CallbackTimer.h b/Sming/Core/CallbackTimer.h index 9844c6ed86..f56ef2dc58 100644 --- a/Sming/Core/CallbackTimer.h +++ b/Sming/Core/CallbackTimer.h @@ -33,6 +33,12 @@ template struct CallbackTimerApi { return ApiDef::typeName(); } + CallbackTimerApi() + { + } + + CallbackTimerApi(const CallbackTimerApi&) = delete; + String name() const { String s; @@ -50,7 +56,6 @@ template struct CallbackTimerApi { s += static_cast(this)->getInterval(); s += ", ticks = "; s += static_cast(this)->ticks(); - // s += ApiDef::Clock::ticks(); return s; } diff --git a/tests/HostTests/host-tests-esp32.hw b/tests/HostTests/host-tests-esp32.hw index d8b9c308fa..f56f5bd7c9 100644 --- a/tests/HostTests/host-tests-esp32.hw +++ b/tests/HostTests/host-tests-esp32.hw @@ -3,7 +3,7 @@ "base_config": "host-tests", "partitions": { "factory": { - "size": "1M" + "size": "1600K" } } } diff --git a/tests/HostTests/modules/Timers.cpp b/tests/HostTests/modules/Timers.cpp index 5e0eda4fba..2dc7bb638c 100644 --- a/tests/HostTests/modules/Timers.cpp +++ b/tests/HostTests/modules/Timers.cpp @@ -81,7 +81,7 @@ class CallbackTimerTest : public TestGroup String s; s += system_get_time(); s += " "; - s += statusTimer; + s += String(statusTimer); s += " fired, timercount = "; s += activeTimerCount; s += ", mem = ";