diff --git a/src/CollarRx.cpp b/src/CollarRx.cpp index cb172e9..5766e78 100644 --- a/src/CollarRx.cpp +++ b/src/CollarRx.cpp @@ -82,7 +82,7 @@ void CollarRx::rx_start() attachInterrupt(digitalPinToInterrupt(_rx_pin), CollarRx::s_isr, RISING); } -void CollarRx::s_isr() +IRAM_ATTR void CollarRx::s_isr() { _instance->isr(); } diff --git a/src/type1/CollarRxType1.cpp b/src/type1/CollarRxType1.cpp index 194b966..d9b7231 100644 --- a/src/type1/CollarRxType1.cpp +++ b/src/type1/CollarRxType1.cpp @@ -50,7 +50,7 @@ bool CollarRxType1::is_message_valid(const uint8_t buffer[5]) return true; } -void CollarRxType1::isr() +IRAM_ATTR void CollarRxType1::isr() { static unsigned long rx_micros =0; static uint8_t pulse_count = 0; diff --git a/src/type2/CollarRxType2.cpp b/src/type2/CollarRxType2.cpp index 96643f7..92c78f8 100644 --- a/src/type2/CollarRxType2.cpp +++ b/src/type2/CollarRxType2.cpp @@ -97,7 +97,7 @@ bool CollarRxType2::buffer_to_collar_message(const uint8_t buffer[5], struct col return is_valid; } -void CollarRxType2::isr() +IRAM_ATTR void CollarRxType2::isr() { static unsigned long rx_micros =0; static uint8_t pulse_count = 0;