is SPI library interrupt safe ?
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
Please fill the info fields, it helps to get you faster support ;)
if you have a stack dump decode it:
https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/stack_dump.md
for better debug messages:
https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/debugging.md
----------------------------- Remove above -----------------------------
### Basic Infos
#### Hardware
Hardware: ESP-12
Core Version: 2.3.0
### Description
I am working arount SPI based LoRa modules with the Radiohead library. I have met many exceptions and after tracking those down, after having reworked Radiohead libraries to make their interrupt routine safe, I had to do the same inside the arduino/esp8266 SPI library.
Am I wrong when I considered the library not interrupt safe?
I have now modified the SPI library and seem to have a stable design.
Anyway, I have joined the modified files for advice.
[SPI_cpp.txt](https://github.com/esp8266/Arduino/files/546493/SPI_cpp.txt)
[SPI_h.txt](https://github.com/esp8266/Arduino/files/546494/SPI_h.txt)
The last and most delicate issue I had was with inline function "setDataBits". I could not find any way to make this one safe without removing its "inline" attribute?
Any feedback on this?
### Settings in IDE
Module: NodeMCU 1.0
Flash Size: 4MB/SPIFS 1MB
CPU Frequency: 160MHz
Flash Mode:
Flash Frequency: 40Mhz
Upload Using: SERIAL
Reset Method: nodemcu
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.