Skip to content
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

Possible race condition in SpiDma transfers #868

Closed
bugadani opened this issue Oct 25, 2023 · 2 comments · Fixed by #869
Closed

Possible race condition in SpiDma transfers #868

bugadani opened this issue Oct 25, 2023 · 2 comments · Fixed by #869

Comments

@bugadani
Copy link
Contributor

bugadani commented Oct 25, 2023

https://github.com/esp-rs/esp-hal/blob/main/esp-hal-common/src/spi/master.rs#L1340

The DMA sets the GDMA_OUT_EOF_CHn_INT_ENA bit after the peripheral starts the transmission. This may result in the future never resolving, if some other code is executed between transmission start and listen start.

Or at least I think this is the case.

@bjoernQ
Copy link
Contributor

bjoernQ commented Oct 25, 2023

I think I've seen problem caused by this pattern with the AES peripheral which is faster (with small amounts of data) than we get to creating the future - so it's not just a hypothetical thing

@bugadani
Copy link
Contributor Author

I think I'm hitting this issue or something related with esp-wifi and a spidma-driven display; the display's DmaTxFuture often stops resolving if my mobile is connected to the device's AP.

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants