Skip to content

Commit b64622d

Browse files
committed
_notifyPWM may be called indirectly from ISR, cannot yield() from ISR, must not panic.
1 parent 4df7186 commit b64622d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cores/esp8266/core_esp8266_waveform_pwm.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141

4242
#include <Arduino.h>
43+
#include <coredecls.h>
4344
#include "ets_sys.h"
4445
#include "core_esp8266_waveform.h"
4546
#include "user_interface.h"
@@ -162,7 +163,7 @@ static IRAM_ATTR void _notifyPWM(PWMState *p, bool idle) {
162163
forceTimerInterrupt();
163164
while (pwmState.pwmUpdate) {
164165
if (idle) {
165-
yield();
166+
esp_break();
166167
}
167168
MEMBARRIER();
168169
}

0 commit comments

Comments
 (0)