-
Notifications
You must be signed in to change notification settings - Fork 94
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
esp-wifi lockup on esp32c3 when using the embassy InterruptExecutor #437
Comments
Seems the scheduler doesn't get a chance to run. On ESP32-C3 interrupts don't get pre-empted and even if they would, the scheduler is priority 1. I don't know much about RIOT but I guess it has its own scheduler and synchronization primitives? In esp-wifi we emulate enough of an RTOS to make things work but I guess it would be better to use esp-wifi-sys and use the RIOT functionality. But again, I really don't know much about RIOT - just guessing |
That sounds like a very likely explanation.
So RIOT-rs does have its own preemptive scheduler, but no RISC-V support for that (yet). Preemptive scheduling is optional in RIOT-rs, we're using embassy for mostly everything at this stage.
Well, there's >12k lines of very nice wrapping & integration code in Anyhow, thanks for looking at this! |
Interesting! Thanks for the insights |
I'm trying to add esp support to RIOT-rs, but I'm having some trouble with esp-wifi.
Basically esp-wifi gets stuck waiting for a semaphore at some point.
I suspect it's because I'm using the InterruptExecutor.
I can reproduce the issue with examples/embassy_dhcp.rs, modified to use the InterruptExecutor.
Here is a gist with the diff.
And here is the end of the trace log:
trace output
Any hints?
The text was updated successfully, but these errors were encountered: