From 5b22f228da634ee549df3a2517c3fca13f6cf038 Mon Sep 17 00:00:00 2001 From: Cebotari Vladislav Date: Sat, 2 Jan 2021 17:32:30 +0000 Subject: [PATCH] Prevent hal_ticks() from going into .text region This will fix an issue when the flash is disabled (due to OTA update for example) and the cpu crashes with cache disabled access from ISR (when TTN executes) --- src/hal/hal_esp32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hal/hal_esp32.cpp b/src/hal/hal_esp32.cpp index ace7626..21367b9 100755 --- a/src/hal/hal_esp32.cpp +++ b/src/hal/hal_esp32.cpp @@ -346,7 +346,7 @@ bool HAL_ESP32::wait(WaitKind waitKind) } // Gets current time in LMIC ticks -u4_t hal_ticks() +u4_t IRAM_ATTR hal_ticks() { // LMIC tick unit: 16µs // esp_timer unit: 1µs