-
Notifications
You must be signed in to change notification settings - Fork 215
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
InterruptExecutor hangs on esp32 when used on APP_CPU with a DMA peripheral #2369
Comments
I'm sorry but the solution here might be to disallow moving initialized peripherals to other cores. If you create the SPI driver on the app core, it should work. |
Thats exactly what the test code does |
Oh hmm apparently I can't read. I'll look into this early next week. |
I can confirm that our interrupt-executor tests have been inadequate and even cases as simple as signalling between cores using |
Okay I can reproduce this and I know what's going on here. When you exit the core1 function, we stall core 1. The interrupt executor does not loop after starting it, so essentially you start it, and then the core1 program ends and stops. Add a |
Why is this not needed for the other chips (at least esp32s3 and esp32c6)?
|
C6 is single-core, S3 needs this or if it doesn't, it's a bug. |
C6 right! but yea - s3 works fine with the example |
ok - wait - maybe not - I never tested that exact example - but I have a similar use case but it has a second normal executor on the second core, maybe that fulfills the loop need. |
Bug description
If you run a DMA peripheral with an InterruptExecutor on the second core it looks like the task is not woken when the first transfer finishes. The test code by default runs spi to continuously output in a loop in an Interrupt executor.
It can be configured (by commenting and uncommenting sections of code) to:
I found this using an i2s parallel driver for the esp32 I'm working on so its not just SPI thats affected.
To Reproduce
Tested from the main branch
Expected behavior
This should continuously output using SPI on the configured pins.
Environment
Target device:
Crate name and version: esp-hal latest GIT (d32a733)
The text was updated successfully, but these errors were encountered: