From 9ef95b4db50761908816883ff40e73fe6048938d Mon Sep 17 00:00:00 2001 From: stefanbode Date: Fri, 25 Feb 2022 20:23:20 +0100 Subject: [PATCH] avoid crash during savedata when heavy load on counter https://arduino-esp8266.readthedocs.io/en/latest/reference.html --- tasmota/settings.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasmota/settings.ino b/tasmota/settings.ino index 6897f21d3..d6df24e9c 100644 --- a/tasmota/settings.ino +++ b/tasmota/settings.ino @@ -624,7 +624,7 @@ void SettingsSave(uint8_t rotate) { Settings->cfg_size = sizeof(TSettings); Settings->cfg_crc = GetSettingsCrc(); // Keep for backward compatibility in case of fall-back just after upgrade Settings->cfg_crc32 = GetSettingsCrc32(); - + CounterInterruptDisable(true); #ifdef ESP8266 #ifdef USE_UFILESYS TfsSaveFile(TASM_FILE_SETTINGS, (const uint8_t*)Settings, sizeof(TSettings)); @@ -650,6 +650,7 @@ void SettingsSave(uint8_t rotate) { } #endif // FIRMWARE_MINIMAL RtcSettingsSave(); + CounterInterruptDisable(false); } void SettingsLoad(void) {