-
Notifications
You must be signed in to change notification settings - Fork 181
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
Remove 4096 limit for SPI dma transfer size #377
Comments
You are correct that this limit is set arbitrary and may not make much sense. Though your assessments is about the 32768 is also not quite right as one has to think differently between actuall dma_descriptor lengths and what the C driver allows you to put a buffer into it. We had a discussion around it in the matrix channel some time ago. But in short, just removing it doesn't make the overall situation better. What we would need is: Based on that testing we could make a decision how to move forward correctly. So if you want to tackle the issue this are the first steps to dive into. |
Isn't it wiser to just let the underlying esp-idf handle this? Right now it panics at runtime and it's not that much different than returning an error (what idf does when you remove the limit) What you are saying is probably better but looks like a lot of work and a lot of maintenance, don't let perfect be the enemy of good |
Why is there a limit on the transfer size for dma?
esp-idf-hal/src/spi.rs
Line 103 in 81675cc
The esp32-s3 can supposedly go up to 32768 and previous models even higher, as referenced on espressif/esp-idf#7804
Also, the documentation doesn't mention this number, it says, for max_transfer_sz
"Maximum transfer size, in bytes. Defaults to 4092 if 0 when DMA enabled, or to SOC_SPI_MAXIMUM_BUFFER_SIZE if DMA is disabled. "
4092 is the default, and the number is wrong too
The 4096 limit is arbitrary, and should be removed
The text was updated successfully, but these errors were encountered: