-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Description
Basic Infos
- This issue complies with the issue POLICY doc.
- I have read the documentation at readthedocs and the issue is not addressed there.
- I have tested that the issue is present in current master branch (aka latest git).
- If there is a stack dump, I have decoded it.
- I have searched the issue tracker for a similar issue.
- I have filled out all fields below.
Platform
- Hardware: [ESP8285 device]
- Core Version:
[SDK:2.2.1(cfd48f3)/Core:2.5.2=20502000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1-7-g82abda3/BearSSL:a143020] - Development Env: [Platformio]
- Operating System: [Windows]
Settings in IDE
- Module: [Generic ESP8285 Module]
- Flash Mode: [other]
- Flash Size: [1MB]
- lwip Variant: [v2 Lower Memory]
- Reset Method: [ck]
- Flash Frequency: [40Mhz]
- CPU Frequency: [80Mhz]
- Upload Using: [SERIAL]
- Upload Speed: [115200]
Problem Description
I am using SPISlave functionality and WiFiManager lib to config wifi connection. External MCU makes some SPI requests to ESP. All works ok, except that moment, when I am trying to do any SPI request while ESP in STA+AP mode (while it switches to this mode, I believe). I found same issue, but with UART, several years ago: #1073. This "protection from UART interrupts" I found here: https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp#L429
Soon I will try to add ETS_SPI_INTR_DISABLE()
and enable too and write here about results, but this issue is about another possible problem:
Maybe we need to block all other unsafe interrupts in same critical sections, not only UART? There also a plenty of another interrupts, which may cause same issues: https://github.com/esp8266/Arduino/blob/master/tools/sdk/include/ets_sys.h#L128