-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Document requirement for ISR handlers to be in IRAM #1388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
btw, i uploaded my I²S WS2812B code there: |
Hi Georg, We can not disable all interrupts because at least WiFi interrupts have to static const int FLASH_INT_MASK = ((B10 << 8) | B00111010); I think SLC interrupt number is 2, so could you add this bit to the mask You may also mark your interrupt handler with IRAM_ATTR, then it will be On Sat, Jan 9, 2016, 05:52 g3gg0.de [email protected] wrote:
|
ah thanks. that makes pretty much sense. because if suddenly "my" interrupt handler is blocked while flash is accessed and so my function is lagging, it is definitely better by default than a crash :) BR, |
When I wrote that code it wasn't yet clear to me which interrupts are On Sat, Jan 9, 2016, 09:30 g3gg0.de [email protected] wrote:
|
yeah that would be cool. |
Adding bit 2 (which is shared between SPI and I2S) to the mask causes the chip to lock up. So I'm not sure that masking I2S interrupts is possible while accessing flash. |
yeah, so putting a comment that explains that interrupt handlers have to be put into RAM is the best solution i guess. |
Added section Other causes for crashes with ISR, Async callbacks, memory guidelines, stack. Fixes #1388 .
* Update a02-my-esp-crashes.rst Added section Other causes for crashes with ISR, Async callbacks, memory guidelines, stack. Fixes #1388 . * Update a02-my-esp-crashes.rst Minor typos and text fixes * Update a02-my-esp-crashes.rst Fixed stack size typo
Hello *,
I modified the UART based NeoPixelBus to use I²S and DMA for CPU-less transfer. (it is based on https://github.com/cnlohr/esp8266ws2812i2s)
First i tried to use Interrupts to poll for kinda vsync implementation.
But while doing that when my code wanted to save some config, SPIFFS always locked up. (no reaction, reset after a couple of minutes)
Sometimes i got an exception with PC right at the interrupt handler address which made me curious.
In the end i found out that it seems that the ROM call for flash writing does not disable (at least) SLC interrupts.
This is a no-go of course if you are rewriting flash content since the flash state machine will get corrupted on every flash access and instruction fetches return crap.
Now when i am polling SLC_RX_EOF_DES_ADDR instead of using an interrupt, everything works like a charm.
Can you confirm this behavior or am i misinterpreting things?
Wouldnt it be a good idea to disable interrupts before calling the ROM functions for flash rewriting?
BR,
Georg
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: