Skip to content

Commit

Permalink
cpu/esp8266: fix ets_post when flash is written
Browse files Browse the repository at this point in the history
During flash write access, the IROM cache cannot be used and is disabled therefore. During that time, ets_post crashes if a functions is called which is not in IRAM. Therefore thread_flags_set must not be called if IROM cache is disabled.
  • Loading branch information
gschorcht committed Jan 6, 2019
1 parent 404297f commit 6694610
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpu/esp8266/sdk/ets_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ uint32_t IRAM ets_post (uint32_t prio, ETSSignal sig, ETSParam par)
system_soft_wdt_feed();
}

if (ets_thread) {
if (ets_thread && irom_cache_enabled()) {
thread_flags_set((thread_t*)ets_thread, THREAD_FLAG_ETS_THREAD);
}

Expand Down

0 comments on commit 6694610

Please sign in to comment.