Open chuckberrypi opened 6 months ago
Hi. This happened because ESPRESSIF changed the Timer API in version 3.0.0. More about the situation here: https://github.com/espressif/arduino-esp32/issues/8796 and https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html As a temporary solution, I changed lines 563-566 in RH_ASK.cpp. I cannot claim that this is absolutely true, but I have not found any errors in my projects. Tested on RH_RF95 and ESP32-C6. Old code:
#elif (RH_PLATFORM == RH_PLATFORM_ESP32)
void RH_INTERRUPT_ATTR esp32_timer_interrupt_handler(); // Forward declaration
timer = timerBegin(0, 80, true); // Alarm value will be in in us
timerAttachInterrupt(timer, &esp32_timer_interrupt_handler, true);
timerAlarmWrite(timer, 1000000 / _speed / 8, true);
timerAlarmEnable(timer);
#endif
New code:
#elif (RH_PLATFORM == RH_PLATFORM_ESP32)
void RH_INTERRUPT_ATTR esp32_timer_interrupt_handler(); // Forward declaration
timer = timerBegin(1000000);
timerAttachInterrupt(timer, &esp32_timer_interrupt_handler);
timerAlarm(timer, 1000000 / _speed / 8, true, 0);
#endif
You can also go back to the previous version 2.0.11 esp32 as a solution.
Just encountered the same problem and the changed timer call from @AniSerNik worked. Thank you very much.
After striking out getting the LowPowerLabs RFM69 library working on this hardware setup, I thought I'd switch tacks and try RadioHead. I can't even get it to compile. Here's the error messages I get when I try to compile: