You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This error leads to Arduino-IRremote/Arduino-IRremote#1152, which can easily reproduced by compiling the SendDemo example of IRRemote library version 4.1.0. After a few seconds, IR output signal generation stops (as expected since I analyzed this bug 😞 ).
Deactivating the disable of the interrupt statement noInterrupts(); in IRSend.hpp near line 1044 fixes the error.
Expected behavior
When calling micros() twice, the second call should always return equal or more than the first call.
Solutions
I have no idea for an solution, but it should at least be documented in the code, to avoid long investigations.
The text was updated successfully, but these errors were encountered:
Hi @ArminJo micros() relies on systick interrupt. If you disable the interrupt, systick is no more incremented.
If you really need to disable interrupt you can try to use delayMicrosecond which uses DWT free running counter, so instead of compute time manually simply wait the request time.
Or as you do do not disable interrupt.
The point you mention from @matthijskooijman is not the same than here.So, unfortunately, I can't do nothing for your issue as if you disable interrupt you freeze the tick.
Describe the bug
It is like #1680, and the current implementation still has this problem described by matthijskooijman:
To Reproduce
This error leads to Arduino-IRremote/Arduino-IRremote#1152, which can easily reproduced by compiling the SendDemo example of IRRemote library version 4.1.0. After a few seconds, IR output signal generation stops (as expected since I analyzed this bug 😞 ).
Deactivating the disable of the interrupt statement
noInterrupts();
in IRSend.hpp near line 1044 fixes the error.Expected behavior
When calling micros() twice, the second call should always return equal or more than the first call.
Solutions
I have no idea for an solution, but it should at least be documented in the code, to avoid long investigations.
The text was updated successfully, but these errors were encountered: